// Copyright 2025 International Digital Economy Academy
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

///|
test "~0 = -1" {
  assert_eq(0L.lnot(), -1L)
}

///|
test "~-1 = 0" {
  assert_eq((-1L).lnot(), 0L)
}

///|
test "~1 = -2" {
  assert_eq(1L.lnot(), -2L)
}

///|
test "~2147483647 = -2147483648" {
  assert_eq(2147483647L.lnot(), -2147483648L)
}

///|
test "~-2147483648 = 2147483647" {
  assert_eq((-2147483648L).lnot(), 2147483647L)
}

///|
test "~2147483648 = -2147483649" {
  assert_eq(2147483648L.lnot(), -2147483649L)
}

///|
test "~-2147483649 = 2147483648" {
  assert_eq((-2147483649L).lnot(), 2147483648L)
}

///|
test "~9223372036854775807 = -9223372036854775808" {
  assert_eq(9223372036854775807L.lnot(), -9223372036854775808L)
}

///|
test "~-9223372036854775808 = 9223372036854775807" {
  assert_eq((-9223372036854775808L).lnot(), 9223372036854775807L)
}

///|
test "~-9223372036854775808 = 9223372036854775807" {
  assert_eq((-9223372036854775808L).lnot(), 9223372036854775807L)
}

///|
test "~9223372036854775807 = -9223372036854775808" {
  assert_eq(9223372036854775807L.lnot(), -9223372036854775808L)
}

///|
test "-0 = 0" {
  let x = 0L
  assert_eq(-x, 0L)
}

///|
test "--1 = 1" {
  let x = -1L
  assert_eq(-x, 1L)
}

///|
test "-1 = -1" {
  let x = 1L
  assert_eq(-x, -1L)
}

///|
test "-2147483647 = -2147483647" {
  let x = 2147483647L
  assert_eq(-x, -2147483647L)
}

///|
test "--2147483648 = 2147483648" {
  let x = -2147483648L
  assert_eq(-x, 2147483648L)
}

///|
test "-2147483648 = -2147483648" {
  let x = 2147483648L
  assert_eq(-x, -2147483648L)
}

///|
test "--2147483649 = 2147483649" {
  let x = -2147483649L
  assert_eq(-x, 2147483649L)
}

///|
test "-9223372036854775807 = -9223372036854775807" {
  let x = 9223372036854775807L
  assert_eq(-x, -9223372036854775807L)
}

///|
test "-9223372036854775807 = -9223372036854775807" {
  let x = 9223372036854775807L
  assert_eq(-x, -9223372036854775807L)
}

///|
test "0 + 0 = 0" {
  assert_eq(0L.op_add(0L), 0L)
}

///|
test "0 + -1 = -1" {
  assert_eq(0L.op_add(-1L), -1L)
}

///|
test "0 + 1 = 1" {
  assert_eq(0L.op_add(1L), 1L)
}

///|
test "0 + 2147483647 = 2147483647" {
  assert_eq(0L.op_add(2147483647L), 2147483647L)
}

///|
test "0 + -2147483648 = -2147483648" {
  assert_eq(0L.op_add(-2147483648L), -2147483648L)
}

///|
test "0 + 2147483648 = 2147483648" {
  assert_eq(0L.op_add(2147483648L), 2147483648L)
}

///|
test "0 + -2147483649 = -2147483649" {
  assert_eq(0L.op_add(-2147483649L), -2147483649L)
}

///|
test "0 + 9223372036854775807 = 9223372036854775807" {
  assert_eq(0L.op_add(9223372036854775807L), 9223372036854775807L)
}

///|
test "0 + -9223372036854775808 = -9223372036854775808" {
  assert_eq(0L.op_add(-9223372036854775808L), -9223372036854775808L)
}

///|
test "0 + -9223372036854775808 = -9223372036854775808" {
  assert_eq(0L.op_add(-9223372036854775808L), -9223372036854775808L)
}

///|
test "0 + 9223372036854775807 = 9223372036854775807" {
  assert_eq(0L.op_add(9223372036854775807L), 9223372036854775807L)
}

///|
test "-1 + 0 = -1" {
  assert_eq((-1L).op_add(0L), -1L)
}

///|
test "-1 + -1 = -2" {
  assert_eq((-1L).op_add(-1L), -2L)
}

///|
test "-1 + 1 = 0" {
  assert_eq((-1L).op_add(1L), 0L)
}

///|
test "-1 + 2147483647 = 2147483646" {
  assert_eq((-1L).op_add(2147483647L), 2147483646L)
}

///|
test "-1 + -2147483648 = -2147483649" {
  assert_eq((-1L).op_add(-2147483648L), -2147483649L)
}

///|
test "-1 + 2147483648 = 2147483647" {
  assert_eq((-1L).op_add(2147483648L), 2147483647L)
}

///|
test "-1 + -2147483649 = -2147483650" {
  assert_eq((-1L).op_add(-2147483649L), -2147483650L)
}

///|
test "-1 + 9223372036854775807 = 9223372036854775806" {
  assert_eq((-1L).op_add(9223372036854775807L), 9223372036854775806L)
}

///|
test "-1 + -9223372036854775808 = 9223372036854775807" {
  assert_eq((-1L).op_add(-9223372036854775808L), 9223372036854775807L)
}

///|
test "-1 + -9223372036854775808 = 9223372036854775807" {
  assert_eq((-1L).op_add(-9223372036854775808L), 9223372036854775807L)
}

///|
test "-1 + 9223372036854775807 = 9223372036854775806" {
  assert_eq((-1L).op_add(9223372036854775807L), 9223372036854775806L)
}

///|
test "1 + 0 = 1" {
  assert_eq(1L.op_add(0L), 1L)
}

///|
test "1 + -1 = 0" {
  assert_eq(1L.op_add(-1L), 0L)
}

///|
test "1 + 1 = 2" {
  assert_eq(1L.op_add(1L), 2L)
}

///|
test "1 + 2147483647 = 2147483648" {
  assert_eq(1L.op_add(2147483647L), 2147483648L)
}

///|
test "1 + -2147483648 = -2147483647" {
  assert_eq(1L.op_add(-2147483648L), -2147483647L)
}

///|
test "1 + 2147483648 = 2147483649" {
  assert_eq(1L.op_add(2147483648L), 2147483649L)
}

///|
test "1 + -2147483649 = -2147483648" {
  assert_eq(1L.op_add(-2147483649L), -2147483648L)
}

///|
test "1 + 9223372036854775807 = -9223372036854775808" {
  assert_eq(1L.op_add(9223372036854775807L), -9223372036854775808L)
}

///|
test "1 + -9223372036854775808 = -9223372036854775807" {
  assert_eq(1L.op_add(-9223372036854775808L), -9223372036854775807L)
}

///|
test "1 + -9223372036854775808 = -9223372036854775807" {
  assert_eq(1L.op_add(-9223372036854775808L), -9223372036854775807L)
}

///|
test "1 + 9223372036854775807 = -9223372036854775808" {
  assert_eq(1L.op_add(9223372036854775807L), -9223372036854775808L)
}

///|
test "2147483647 + 0 = 2147483647" {
  assert_eq(2147483647L.op_add(0L), 2147483647L)
}

///|
test "2147483647 + -1 = 2147483646" {
  assert_eq(2147483647L.op_add(-1L), 2147483646L)
}

///|
test "2147483647 + 1 = 2147483648" {
  assert_eq(2147483647L.op_add(1L), 2147483648L)
}

///|
test "2147483647 + 2147483647 = 4294967294" {
  assert_eq(2147483647L.op_add(2147483647L), 4294967294L)
}

///|
test "2147483647 + -2147483648 = -1" {
  assert_eq(2147483647L.op_add(-2147483648L), -1L)
}

///|
test "2147483647 + 2147483648 = 4294967295" {
  assert_eq(2147483647L.op_add(2147483648L), 4294967295L)
}

///|
test "2147483647 + -2147483649 = -2" {
  assert_eq(2147483647L.op_add(-2147483649L), -2L)
}

///|
test "2147483647 + 9223372036854775807 = -9223372034707292162" {
  assert_eq(2147483647L.op_add(9223372036854775807L), -9223372034707292162L)
}

///|
test "2147483647 + -9223372036854775808 = -9223372034707292161" {
  assert_eq(2147483647L.op_add(-9223372036854775808L), -9223372034707292161L)
}

///|
test "2147483647 + -9223372036854775808 = -9223372034707292161" {
  assert_eq(2147483647L.op_add(-9223372036854775808L), -9223372034707292161L)
}

///|
test "2147483647 + 9223372036854775807 = -9223372034707292162" {
  assert_eq(2147483647L.op_add(9223372036854775807L), -9223372034707292162L)
}

///|
test "-2147483648 + 0 = -2147483648" {
  assert_eq((-2147483648L).op_add(0L), -2147483648L)
}

///|
test "-2147483648 + -1 = -2147483649" {
  assert_eq((-2147483648L).op_add(-1L), -2147483649L)
}

///|
test "-2147483648 + 1 = -2147483647" {
  assert_eq((-2147483648L).op_add(1L), -2147483647L)
}

///|
test "-2147483648 + 2147483647 = -1" {
  assert_eq((-2147483648L).op_add(2147483647L), -1L)
}

///|
test "-2147483648 + -2147483648 = -4294967296" {
  assert_eq((-2147483648L).op_add(-2147483648L), -4294967296L)
}

///|
test "-2147483648 + 2147483648 = 0" {
  assert_eq((-2147483648L).op_add(2147483648L), 0L)
}

///|
test "-2147483648 + -2147483649 = -4294967297" {
  assert_eq((-2147483648L).op_add(-2147483649L), -4294967297L)
}

///|
test "-2147483648 + 9223372036854775807 = 9223372034707292159" {
  assert_eq((-2147483648L).op_add(9223372036854775807L), 9223372034707292159L)
}

///|
test "-2147483648 + -9223372036854775808 = 9223372034707292160" {
  assert_eq((-2147483648L).op_add(-9223372036854775808L), 9223372034707292160L)
}

///|
test "-2147483648 + -9223372036854775808 = 9223372034707292160" {
  assert_eq((-2147483648L).op_add(-9223372036854775808L), 9223372034707292160L)
}

///|
test "-2147483648 + 9223372036854775807 = 9223372034707292159" {
  assert_eq((-2147483648L).op_add(9223372036854775807L), 9223372034707292159L)
}

///|
test "2147483648 + 0 = 2147483648" {
  assert_eq(2147483648L.op_add(0L), 2147483648L)
}

///|
test "2147483648 + -1 = 2147483647" {
  assert_eq(2147483648L.op_add(-1L), 2147483647L)
}

///|
test "2147483648 + 1 = 2147483649" {
  assert_eq(2147483648L.op_add(1L), 2147483649L)
}

///|
test "2147483648 + 2147483647 = 4294967295" {
  assert_eq(2147483648L.op_add(2147483647L), 4294967295L)
}

///|
test "2147483648 + -2147483648 = 0" {
  assert_eq(2147483648L.op_add(-2147483648L), 0L)
}

///|
test "2147483648 + 2147483648 = 4294967296" {
  assert_eq(2147483648L.op_add(2147483648L), 4294967296L)
}

///|
test "2147483648 + -2147483649 = -1" {
  assert_eq(2147483648L.op_add(-2147483649L), -1L)
}

///|
test "2147483648 + 9223372036854775807 = -9223372034707292161" {
  assert_eq(2147483648L.op_add(9223372036854775807L), -9223372034707292161L)
}

///|
test "2147483648 + -9223372036854775808 = -9223372034707292160" {
  assert_eq(2147483648L.op_add(-9223372036854775808L), -9223372034707292160L)
}

///|
test "2147483648 + -9223372036854775808 = -9223372034707292160" {
  assert_eq(2147483648L.op_add(-9223372036854775808L), -9223372034707292160L)
}

///|
test "2147483648 + 9223372036854775807 = -9223372034707292161" {
  assert_eq(2147483648L.op_add(9223372036854775807L), -9223372034707292161L)
}

///|
test "-2147483649 + 0 = -2147483649" {
  assert_eq((-2147483649L).op_add(0L), -2147483649L)
}

///|
test "-2147483649 + -1 = -2147483650" {
  assert_eq((-2147483649L).op_add(-1L), -2147483650L)
}

///|
test "-2147483649 + 1 = -2147483648" {
  assert_eq((-2147483649L).op_add(1L), -2147483648L)
}

///|
test "-2147483649 + 2147483647 = -2" {
  assert_eq((-2147483649L).op_add(2147483647L), -2L)
}

///|
test "-2147483649 + -2147483648 = -4294967297" {
  assert_eq((-2147483649L).op_add(-2147483648L), -4294967297L)
}

///|
test "-2147483649 + 2147483648 = -1" {
  assert_eq((-2147483649L).op_add(2147483648L), -1L)
}

///|
test "-2147483649 + -2147483649 = -4294967298" {
  assert_eq((-2147483649L).op_add(-2147483649L), -4294967298L)
}

///|
test "-2147483649 + 9223372036854775807 = 9223372034707292158" {
  assert_eq((-2147483649L).op_add(9223372036854775807L), 9223372034707292158L)
}

///|
test "-2147483649 + -9223372036854775808 = 9223372034707292159" {
  assert_eq((-2147483649L).op_add(-9223372036854775808L), 9223372034707292159L)
}

///|
test "-2147483649 + -9223372036854775808 = 9223372034707292159" {
  assert_eq((-2147483649L).op_add(-9223372036854775808L), 9223372034707292159L)
}

///|
test "-2147483649 + 9223372036854775807 = 9223372034707292158" {
  assert_eq((-2147483649L).op_add(9223372036854775807L), 9223372034707292158L)
}

///|
test "9223372036854775807 + 0 = 9223372036854775807" {
  assert_eq(9223372036854775807L.op_add(0L), 9223372036854775807L)
}

///|
test "9223372036854775807 + -1 = 9223372036854775806" {
  assert_eq(9223372036854775807L.op_add(-1L), 9223372036854775806L)
}

///|
test "9223372036854775807 + 1 = -9223372036854775808" {
  assert_eq(9223372036854775807L.op_add(1L), -9223372036854775808L)
}

///|
test "9223372036854775807 + 2147483647 = -9223372034707292162" {
  assert_eq(9223372036854775807L.op_add(2147483647L), -9223372034707292162L)
}

///|
test "9223372036854775807 + -2147483648 = 9223372034707292159" {
  assert_eq(9223372036854775807L.op_add(-2147483648L), 9223372034707292159L)
}

///|
test "9223372036854775807 + 2147483648 = -9223372034707292161" {
  assert_eq(9223372036854775807L.op_add(2147483648L), -9223372034707292161L)
}

///|
test "9223372036854775807 + -2147483649 = 9223372034707292158" {
  assert_eq(9223372036854775807L.op_add(-2147483649L), 9223372034707292158L)
}

///|
test "9223372036854775807 + 9223372036854775807 = -2" {
  assert_eq(9223372036854775807L.op_add(9223372036854775807L), -2L)
}

///|
test "9223372036854775807 + -9223372036854775808 = -1" {
  assert_eq(9223372036854775807L.op_add(-9223372036854775808L), -1L)
}

///|
test "9223372036854775807 + -9223372036854775808 = -1" {
  assert_eq(9223372036854775807L.op_add(-9223372036854775808L), -1L)
}

///|
test "9223372036854775807 + 9223372036854775807 = -2" {
  assert_eq(9223372036854775807L.op_add(9223372036854775807L), -2L)
}

///|
test "-9223372036854775808 + 0 = -9223372036854775808" {
  assert_eq((-9223372036854775808L).op_add(0L), -9223372036854775808L)
}

///|
test "-9223372036854775808 + -1 = 9223372036854775807" {
  assert_eq((-9223372036854775808L).op_add(-1L), 9223372036854775807L)
}

///|
test "-9223372036854775808 + 1 = -9223372036854775807" {
  assert_eq((-9223372036854775808L).op_add(1L), -9223372036854775807L)
}

///|
test "-9223372036854775808 + 2147483647 = -9223372034707292161" {
  assert_eq((-9223372036854775808L).op_add(2147483647L), -9223372034707292161L)
}

///|
test "-9223372036854775808 + -2147483648 = 9223372034707292160" {
  assert_eq((-9223372036854775808L).op_add(-2147483648L), 9223372034707292160L)
}

///|
test "-9223372036854775808 + 2147483648 = -9223372034707292160" {
  assert_eq((-9223372036854775808L).op_add(2147483648L), -9223372034707292160L)
}

///|
test "-9223372036854775808 + -2147483649 = 9223372034707292159" {
  assert_eq((-9223372036854775808L).op_add(-2147483649L), 9223372034707292159L)
}

///|
test "-9223372036854775808 + 9223372036854775807 = -1" {
  assert_eq((-9223372036854775808L).op_add(9223372036854775807L), -1L)
}

///|
test "-9223372036854775808 + -9223372036854775808 = 0" {
  assert_eq((-9223372036854775808L).op_add(-9223372036854775808L), 0L)
}

///|
test "-9223372036854775808 + -9223372036854775808 = 0" {
  assert_eq((-9223372036854775808L).op_add(-9223372036854775808L), 0L)
}

///|
test "-9223372036854775808 + 9223372036854775807 = -1" {
  assert_eq((-9223372036854775808L).op_add(9223372036854775807L), -1L)
}

///|
test "-9223372036854775808 + 0 = -9223372036854775808" {
  assert_eq((-9223372036854775808L).op_add(0L), -9223372036854775808L)
}

///|
test "-9223372036854775808 + -1 = 9223372036854775807" {
  assert_eq((-9223372036854775808L).op_add(-1L), 9223372036854775807L)
}

///|
test "-9223372036854775808 + 1 = -9223372036854775807" {
  assert_eq((-9223372036854775808L).op_add(1L), -9223372036854775807L)
}

///|
test "-9223372036854775808 + 2147483647 = -9223372034707292161" {
  assert_eq((-9223372036854775808L).op_add(2147483647L), -9223372034707292161L)
}

///|
test "-9223372036854775808 + -2147483648 = 9223372034707292160" {
  assert_eq((-9223372036854775808L).op_add(-2147483648L), 9223372034707292160L)
}

///|
test "-9223372036854775808 + 2147483648 = -9223372034707292160" {
  assert_eq((-9223372036854775808L).op_add(2147483648L), -9223372034707292160L)
}

///|
test "-9223372036854775808 + -2147483649 = 9223372034707292159" {
  assert_eq((-9223372036854775808L).op_add(-2147483649L), 9223372034707292159L)
}

///|
test "-9223372036854775808 + 9223372036854775807 = -1" {
  assert_eq((-9223372036854775808L).op_add(9223372036854775807L), -1L)
}

///|
test "-9223372036854775808 + -9223372036854775808 = 0" {
  assert_eq((-9223372036854775808L).op_add(-9223372036854775808L), 0L)
}

///|
test "-9223372036854775808 + -9223372036854775808 = 0" {
  assert_eq((-9223372036854775808L).op_add(-9223372036854775808L), 0L)
}

///|
test "-9223372036854775808 + 9223372036854775807 = -1" {
  assert_eq((-9223372036854775808L).op_add(9223372036854775807L), -1L)
}

///|
test "9223372036854775807 + 0 = 9223372036854775807" {
  assert_eq(9223372036854775807L.op_add(0L), 9223372036854775807L)
}

///|
test "9223372036854775807 + -1 = 9223372036854775806" {
  assert_eq(9223372036854775807L.op_add(-1L), 9223372036854775806L)
}

///|
test "9223372036854775807 + 1 = -9223372036854775808" {
  assert_eq(9223372036854775807L.op_add(1L), -9223372036854775808L)
}

///|
test "9223372036854775807 + 2147483647 = -9223372034707292162" {
  assert_eq(9223372036854775807L.op_add(2147483647L), -9223372034707292162L)
}

///|
test "9223372036854775807 + -2147483648 = 9223372034707292159" {
  assert_eq(9223372036854775807L.op_add(-2147483648L), 9223372034707292159L)
}

///|
test "9223372036854775807 + 2147483648 = -9223372034707292161" {
  assert_eq(9223372036854775807L.op_add(2147483648L), -9223372034707292161L)
}

///|
test "9223372036854775807 + -2147483649 = 9223372034707292158" {
  assert_eq(9223372036854775807L.op_add(-2147483649L), 9223372034707292158L)
}

///|
test "9223372036854775807 + 9223372036854775807 = -2" {
  assert_eq(9223372036854775807L.op_add(9223372036854775807L), -2L)
}

///|
test "9223372036854775807 + -9223372036854775808 = -1" {
  assert_eq(9223372036854775807L.op_add(-9223372036854775808L), -1L)
}

///|
test "9223372036854775807 + -9223372036854775808 = -1" {
  assert_eq(9223372036854775807L.op_add(-9223372036854775808L), -1L)
}

///|
test "9223372036854775807 + 9223372036854775807 = -2" {
  assert_eq(9223372036854775807L.op_add(9223372036854775807L), -2L)
}

///|
test "0 - 0 = 0" {
  assert_eq(0L.op_sub(0L), 0L)
}

///|
test "0 - -1 = 1" {
  assert_eq(0L.op_sub(-1L), 1L)
}

///|
test "0 - 1 = -1" {
  assert_eq(0L.op_sub(1L), -1L)
}

///|
test "0 - 2147483647 = -2147483647" {
  assert_eq(0L.op_sub(2147483647L), -2147483647L)
}

///|
test "0 - -2147483648 = 2147483648" {
  assert_eq(0L.op_sub(-2147483648L), 2147483648L)
}

///|
test "0 - 2147483648 = -2147483648" {
  assert_eq(0L.op_sub(2147483648L), -2147483648L)
}

///|
test "0 - -2147483649 = 2147483649" {
  assert_eq(0L.op_sub(-2147483649L), 2147483649L)
}

///|
test "0 - 9223372036854775807 = -9223372036854775807" {
  assert_eq(0L.op_sub(9223372036854775807L), -9223372036854775807L)
}

///|
test "0 - -9223372036854775808 = -9223372036854775808" {
  assert_eq(0L.op_sub(-9223372036854775808L), -9223372036854775808L)
}

///|
test "0 - -9223372036854775808 = -9223372036854775808" {
  assert_eq(0L.op_sub(-9223372036854775808L), -9223372036854775808L)
}

///|
test "0 - 9223372036854775807 = -9223372036854775807" {
  assert_eq(0L.op_sub(9223372036854775807L), -9223372036854775807L)
}

///|
test "-1 - 0 = -1" {
  assert_eq((-1L).op_sub(0L), -1L)
}

///|
test "-1 - -1 = 0" {
  assert_eq((-1L).op_sub(-1L), 0L)
}

///|
test "-1 - 1 = -2" {
  assert_eq((-1L).op_sub(1L), -2L)
}

///|
test "-1 - 2147483647 = -2147483648" {
  assert_eq((-1L).op_sub(2147483647L), -2147483648L)
}

///|
test "-1 - -2147483648 = 2147483647" {
  assert_eq((-1L).op_sub(-2147483648L), 2147483647L)
}

///|
test "-1 - 2147483648 = -2147483649" {
  assert_eq((-1L).op_sub(2147483648L), -2147483649L)
}

///|
test "-1 - -2147483649 = 2147483648" {
  assert_eq((-1L).op_sub(-2147483649L), 2147483648L)
}

///|
test "-1 - 9223372036854775807 = -9223372036854775808" {
  assert_eq((-1L).op_sub(9223372036854775807L), -9223372036854775808L)
}

///|
test "-1 - -9223372036854775808 = 9223372036854775807" {
  assert_eq((-1L).op_sub(-9223372036854775808L), 9223372036854775807L)
}

///|
test "-1 - -9223372036854775808 = 9223372036854775807" {
  assert_eq((-1L).op_sub(-9223372036854775808L), 9223372036854775807L)
}

///|
test "-1 - 9223372036854775807 = -9223372036854775808" {
  assert_eq((-1L).op_sub(9223372036854775807L), -9223372036854775808L)
}

///|
test "1 - 0 = 1" {
  assert_eq(1L.op_sub(0L), 1L)
}

///|
test "1 - -1 = 2" {
  assert_eq(1L.op_sub(-1L), 2L)
}

///|
test "1 - 1 = 0" {
  assert_eq(1L.op_sub(1L), 0L)
}

///|
test "1 - 2147483647 = -2147483646" {
  assert_eq(1L.op_sub(2147483647L), -2147483646L)
}

///|
test "1 - -2147483648 = 2147483649" {
  assert_eq(1L.op_sub(-2147483648L), 2147483649L)
}

///|
test "1 - 2147483648 = -2147483647" {
  assert_eq(1L.op_sub(2147483648L), -2147483647L)
}

///|
test "1 - -2147483649 = 2147483650" {
  assert_eq(1L.op_sub(-2147483649L), 2147483650L)
}

///|
test "1 - 9223372036854775807 = -9223372036854775806" {
  assert_eq(1L.op_sub(9223372036854775807L), -9223372036854775806L)
}

///|
test "1 - -9223372036854775808 = -9223372036854775807" {
  assert_eq(1L.op_sub(-9223372036854775808L), -9223372036854775807L)
}

///|
test "1 - -9223372036854775808 = -9223372036854775807" {
  assert_eq(1L.op_sub(-9223372036854775808L), -9223372036854775807L)
}

///|
test "1 - 9223372036854775807 = -9223372036854775806" {
  assert_eq(1L.op_sub(9223372036854775807L), -9223372036854775806L)
}

///|
test "2147483647 - 0 = 2147483647" {
  assert_eq(2147483647L.op_sub(0L), 2147483647L)
}

///|
test "2147483647 - -1 = 2147483648" {
  assert_eq(2147483647L.op_sub(-1L), 2147483648L)
}

///|
test "2147483647 - 1 = 2147483646" {
  assert_eq(2147483647L.op_sub(1L), 2147483646L)
}

///|
test "2147483647 - 2147483647 = 0" {
  assert_eq(2147483647L.op_sub(2147483647L), 0L)
}

///|
test "2147483647 - -2147483648 = 4294967295" {
  assert_eq(2147483647L.op_sub(-2147483648L), 4294967295L)
}

///|
test "2147483647 - 2147483648 = -1" {
  assert_eq(2147483647L.op_sub(2147483648L), -1L)
}

///|
test "2147483647 - -2147483649 = 4294967296" {
  assert_eq(2147483647L.op_sub(-2147483649L), 4294967296L)
}

///|
test "2147483647 - 9223372036854775807 = -9223372034707292160" {
  assert_eq(2147483647L.op_sub(9223372036854775807L), -9223372034707292160L)
}

///|
test "2147483647 - -9223372036854775808 = -9223372034707292161" {
  assert_eq(2147483647L.op_sub(-9223372036854775808L), -9223372034707292161L)
}

///|
test "2147483647 - -9223372036854775808 = -9223372034707292161" {
  assert_eq(2147483647L.op_sub(-9223372036854775808L), -9223372034707292161L)
}

///|
test "2147483647 - 9223372036854775807 = -9223372034707292160" {
  assert_eq(2147483647L.op_sub(9223372036854775807L), -9223372034707292160L)
}

///|
test "-2147483648 - 0 = -2147483648" {
  assert_eq((-2147483648L).op_sub(0L), -2147483648L)
}

///|
test "-2147483648 - -1 = -2147483647" {
  assert_eq((-2147483648L).op_sub(-1L), -2147483647L)
}

///|
test "-2147483648 - 1 = -2147483649" {
  assert_eq((-2147483648L).op_sub(1L), -2147483649L)
}

///|
test "-2147483648 - 2147483647 = -4294967295" {
  assert_eq((-2147483648L).op_sub(2147483647L), -4294967295L)
}

///|
test "-2147483648 - -2147483648 = 0" {
  assert_eq((-2147483648L).op_sub(-2147483648L), 0L)
}

///|
test "-2147483648 - 2147483648 = -4294967296" {
  assert_eq((-2147483648L).op_sub(2147483648L), -4294967296L)
}

///|
test "-2147483648 - -2147483649 = 1" {
  assert_eq((-2147483648L).op_sub(-2147483649L), 1L)
}

///|
test "-2147483648 - 9223372036854775807 = 9223372034707292161" {
  assert_eq((-2147483648L).op_sub(9223372036854775807L), 9223372034707292161L)
}

///|
test "-2147483648 - -9223372036854775808 = 9223372034707292160" {
  assert_eq((-2147483648L).op_sub(-9223372036854775808L), 9223372034707292160L)
}

///|
test "-2147483648 - -9223372036854775808 = 9223372034707292160" {
  assert_eq((-2147483648L).op_sub(-9223372036854775808L), 9223372034707292160L)
}

///|
test "-2147483648 - 9223372036854775807 = 9223372034707292161" {
  assert_eq((-2147483648L).op_sub(9223372036854775807L), 9223372034707292161L)
}

///|
test "2147483648 - 0 = 2147483648" {
  assert_eq(2147483648L.op_sub(0L), 2147483648L)
}

///|
test "2147483648 - -1 = 2147483649" {
  assert_eq(2147483648L.op_sub(-1L), 2147483649L)
}

///|
test "2147483648 - 1 = 2147483647" {
  assert_eq(2147483648L.op_sub(1L), 2147483647L)
}

///|
test "2147483648 - 2147483647 = 1" {
  assert_eq(2147483648L.op_sub(2147483647L), 1L)
}

///|
test "2147483648 - -2147483648 = 4294967296" {
  assert_eq(2147483648L.op_sub(-2147483648L), 4294967296L)
}

///|
test "2147483648 - 2147483648 = 0" {
  assert_eq(2147483648L.op_sub(2147483648L), 0L)
}

///|
test "2147483648 - -2147483649 = 4294967297" {
  assert_eq(2147483648L.op_sub(-2147483649L), 4294967297L)
}

///|
test "2147483648 - 9223372036854775807 = -9223372034707292159" {
  assert_eq(2147483648L.op_sub(9223372036854775807L), -9223372034707292159L)
}

///|
test "2147483648 - -9223372036854775808 = -9223372034707292160" {
  assert_eq(2147483648L.op_sub(-9223372036854775808L), -9223372034707292160L)
}

///|
test "2147483648 - -9223372036854775808 = -9223372034707292160" {
  assert_eq(2147483648L.op_sub(-9223372036854775808L), -9223372034707292160L)
}

///|
test "2147483648 - 9223372036854775807 = -9223372034707292159" {
  assert_eq(2147483648L.op_sub(9223372036854775807L), -9223372034707292159L)
}

///|
test "-2147483649 - 0 = -2147483649" {
  assert_eq((-2147483649L).op_sub(0L), -2147483649L)
}

///|
test "-2147483649 - -1 = -2147483648" {
  assert_eq((-2147483649L).op_sub(-1L), -2147483648L)
}

///|
test "-2147483649 - 1 = -2147483650" {
  assert_eq((-2147483649L).op_sub(1L), -2147483650L)
}

///|
test "-2147483649 - 2147483647 = -4294967296" {
  assert_eq((-2147483649L).op_sub(2147483647L), -4294967296L)
}

///|
test "-2147483649 - -2147483648 = -1" {
  assert_eq((-2147483649L).op_sub(-2147483648L), -1L)
}

///|
test "-2147483649 - 2147483648 = -4294967297" {
  assert_eq((-2147483649L).op_sub(2147483648L), -4294967297L)
}

///|
test "-2147483649 - -2147483649 = 0" {
  assert_eq((-2147483649L).op_sub(-2147483649L), 0L)
}

///|
test "-2147483649 - 9223372036854775807 = 9223372034707292160" {
  assert_eq((-2147483649L).op_sub(9223372036854775807L), 9223372034707292160L)
}

///|
test "-2147483649 - -9223372036854775808 = 9223372034707292159" {
  assert_eq((-2147483649L).op_sub(-9223372036854775808L), 9223372034707292159L)
}

///|
test "-2147483649 - -9223372036854775808 = 9223372034707292159" {
  assert_eq((-2147483649L).op_sub(-9223372036854775808L), 9223372034707292159L)
}

///|
test "-2147483649 - 9223372036854775807 = 9223372034707292160" {
  assert_eq((-2147483649L).op_sub(9223372036854775807L), 9223372034707292160L)
}

///|
test "9223372036854775807 - 0 = 9223372036854775807" {
  assert_eq(9223372036854775807L.op_sub(0L), 9223372036854775807L)
}

///|
test "9223372036854775807 - -1 = -9223372036854775808" {
  assert_eq(9223372036854775807L.op_sub(-1L), -9223372036854775808L)
}

///|
test "9223372036854775807 - 1 = 9223372036854775806" {
  assert_eq(9223372036854775807L.op_sub(1L), 9223372036854775806L)
}

///|
test "9223372036854775807 - 2147483647 = 9223372034707292160" {
  assert_eq(9223372036854775807L.op_sub(2147483647L), 9223372034707292160L)
}

///|
test "9223372036854775807 - -2147483648 = -9223372034707292161" {
  assert_eq(9223372036854775807L.op_sub(-2147483648L), -9223372034707292161L)
}

///|
test "9223372036854775807 - 2147483648 = 9223372034707292159" {
  assert_eq(9223372036854775807L.op_sub(2147483648L), 9223372034707292159L)
}

///|
test "9223372036854775807 - -2147483649 = -9223372034707292160" {
  assert_eq(9223372036854775807L.op_sub(-2147483649L), -9223372034707292160L)
}

///|
test "9223372036854775807 - 9223372036854775807 = 0" {
  assert_eq(9223372036854775807L.op_sub(9223372036854775807L), 0L)
}

///|
test "9223372036854775807 - -9223372036854775808 = -1" {
  assert_eq(9223372036854775807L.op_sub(-9223372036854775808L), -1L)
}

///|
test "9223372036854775807 - -9223372036854775808 = -1" {
  assert_eq(9223372036854775807L.op_sub(-9223372036854775808L), -1L)
}

///|
test "9223372036854775807 - 9223372036854775807 = 0" {
  assert_eq(9223372036854775807L.op_sub(9223372036854775807L), 0L)
}

///|
test "-9223372036854775808 - 0 = -9223372036854775808" {
  assert_eq((-9223372036854775808L).op_sub(0L), -9223372036854775808L)
}

///|
test "-9223372036854775808 - -1 = -9223372036854775807" {
  assert_eq((-9223372036854775808L).op_sub(-1L), -9223372036854775807L)
}

///|
test "-9223372036854775808 - 1 = 9223372036854775807" {
  assert_eq((-9223372036854775808L).op_sub(1L), 9223372036854775807L)
}

///|
test "-9223372036854775808 - 2147483647 = 9223372034707292161" {
  assert_eq((-9223372036854775808L).op_sub(2147483647L), 9223372034707292161L)
}

///|
test "-9223372036854775808 - -2147483648 = -9223372034707292160" {
  assert_eq((-9223372036854775808L).op_sub(-2147483648L), -9223372034707292160L)
}

///|
test "-9223372036854775808 - 2147483648 = 9223372034707292160" {
  assert_eq((-9223372036854775808L).op_sub(2147483648L), 9223372034707292160L)
}

///|
test "-9223372036854775808 - -2147483649 = -9223372034707292159" {
  assert_eq((-9223372036854775808L).op_sub(-2147483649L), -9223372034707292159L)
}

///|
test "-9223372036854775808 - 9223372036854775807 = 1" {
  assert_eq((-9223372036854775808L).op_sub(9223372036854775807L), 1L)
}

///|
test "-9223372036854775808 - -9223372036854775808 = 0" {
  assert_eq((-9223372036854775808L).op_sub(-9223372036854775808L), 0L)
}

///|
test "-9223372036854775808 - -9223372036854775808 = 0" {
  assert_eq((-9223372036854775808L).op_sub(-9223372036854775808L), 0L)
}

///|
test "-9223372036854775808 - 9223372036854775807 = 1" {
  assert_eq((-9223372036854775808L).op_sub(9223372036854775807L), 1L)
}

///|
test "-9223372036854775808 - 0 = -9223372036854775808" {
  assert_eq((-9223372036854775808L).op_sub(0L), -9223372036854775808L)
}

///|
test "-9223372036854775808 - -1 = -9223372036854775807" {
  assert_eq((-9223372036854775808L).op_sub(-1L), -9223372036854775807L)
}

///|
test "-9223372036854775808 - 1 = 9223372036854775807" {
  assert_eq((-9223372036854775808L).op_sub(1L), 9223372036854775807L)
}

///|
test "-9223372036854775808 - 2147483647 = 9223372034707292161" {
  assert_eq((-9223372036854775808L).op_sub(2147483647L), 9223372034707292161L)
}

///|
test "-9223372036854775808 - -2147483648 = -9223372034707292160" {
  assert_eq((-9223372036854775808L).op_sub(-2147483648L), -9223372034707292160L)
}

///|
test "-9223372036854775808 - 2147483648 = 9223372034707292160" {
  assert_eq((-9223372036854775808L).op_sub(2147483648L), 9223372034707292160L)
}

///|
test "-9223372036854775808 - -2147483649 = -9223372034707292159" {
  assert_eq((-9223372036854775808L).op_sub(-2147483649L), -9223372034707292159L)
}

///|
test "-9223372036854775808 - 9223372036854775807 = 1" {
  assert_eq((-9223372036854775808L).op_sub(9223372036854775807L), 1L)
}

///|
test "-9223372036854775808 - -9223372036854775808 = 0" {
  assert_eq((-9223372036854775808L).op_sub(-9223372036854775808L), 0L)
}

///|
test "-9223372036854775808 - -9223372036854775808 = 0" {
  assert_eq((-9223372036854775808L).op_sub(-9223372036854775808L), 0L)
}

///|
test "-9223372036854775808 - 9223372036854775807 = 1" {
  assert_eq((-9223372036854775808L).op_sub(9223372036854775807L), 1L)
}

///|
test "9223372036854775807 - 0 = 9223372036854775807" {
  assert_eq(9223372036854775807L.op_sub(0L), 9223372036854775807L)
}

///|
test "9223372036854775807 - -1 = -9223372036854775808" {
  assert_eq(9223372036854775807L.op_sub(-1L), -9223372036854775808L)
}

///|
test "9223372036854775807 - 1 = 9223372036854775806" {
  assert_eq(9223372036854775807L.op_sub(1L), 9223372036854775806L)
}

///|
test "9223372036854775807 - 2147483647 = 9223372034707292160" {
  assert_eq(9223372036854775807L.op_sub(2147483647L), 9223372034707292160L)
}

///|
test "9223372036854775807 - -2147483648 = -9223372034707292161" {
  assert_eq(9223372036854775807L.op_sub(-2147483648L), -9223372034707292161L)
}

///|
test "9223372036854775807 - 2147483648 = 9223372034707292159" {
  assert_eq(9223372036854775807L.op_sub(2147483648L), 9223372034707292159L)
}

///|
test "9223372036854775807 - -2147483649 = -9223372034707292160" {
  assert_eq(9223372036854775807L.op_sub(-2147483649L), -9223372034707292160L)
}

///|
test "9223372036854775807 - 9223372036854775807 = 0" {
  assert_eq(9223372036854775807L.op_sub(9223372036854775807L), 0L)
}

///|
test "9223372036854775807 - -9223372036854775808 = -1" {
  assert_eq(9223372036854775807L.op_sub(-9223372036854775808L), -1L)
}

///|
test "9223372036854775807 - -9223372036854775808 = -1" {
  assert_eq(9223372036854775807L.op_sub(-9223372036854775808L), -1L)
}

///|
test "9223372036854775807 - 9223372036854775807 = 0" {
  assert_eq(9223372036854775807L.op_sub(9223372036854775807L), 0L)
}

///|
test "0 * 0 = 0" {
  assert_eq(0L.op_mul(0L), 0L)
}

///|
test "0 * -1 = 0" {
  assert_eq(0L.op_mul(-1L), 0L)
}

///|
test "0 * 1 = 0" {
  assert_eq(0L.op_mul(1L), 0L)
}

///|
test "0 * 2147483647 = 0" {
  assert_eq(0L.op_mul(2147483647L), 0L)
}

///|
test "0 * -2147483648 = 0" {
  assert_eq(0L.op_mul(-2147483648L), 0L)
}

///|
test "0 * 2147483648 = 0" {
  assert_eq(0L.op_mul(2147483648L), 0L)
}

///|
test "0 * -2147483649 = 0" {
  assert_eq(0L.op_mul(-2147483649L), 0L)
}

///|
test "0 * 9223372036854775807 = 0" {
  assert_eq(0L.op_mul(9223372036854775807L), 0L)
}

///|
test "0 * -9223372036854775808 = 0" {
  assert_eq(0L.op_mul(-9223372036854775808L), 0L)
}

///|
test "0 * -9223372036854775808 = 0" {
  assert_eq(0L.op_mul(-9223372036854775808L), 0L)
}

///|
test "0 * 9223372036854775807 = 0" {
  assert_eq(0L.op_mul(9223372036854775807L), 0L)
}

///|
test "-1 * 0 = 0" {
  assert_eq((-1L).op_mul(0L), 0L)
}

///|
test "-1 * -1 = 1" {
  assert_eq((-1L).op_mul(-1L), 1L)
}

///|
test "-1 * 1 = -1" {
  assert_eq((-1L).op_mul(1L), -1L)
}

///|
test "-1 * 2147483647 = -2147483647" {
  assert_eq((-1L).op_mul(2147483647L), -2147483647L)
}

///|
test "-1 * -2147483648 = 2147483648" {
  assert_eq((-1L).op_mul(-2147483648L), 2147483648L)
}

///|
test "-1 * 2147483648 = -2147483648" {
  assert_eq((-1L).op_mul(2147483648L), -2147483648L)
}

///|
test "-1 * -2147483649 = 2147483649" {
  assert_eq((-1L).op_mul(-2147483649L), 2147483649L)
}

///|
test "-1 * 9223372036854775807 = -9223372036854775807" {
  assert_eq((-1L).op_mul(9223372036854775807L), -9223372036854775807L)
}

///|
test "-1 * -9223372036854775808 = -9223372036854775808" {
  assert_eq((-1L).op_mul(-9223372036854775808L), -9223372036854775808L)
}

///|
test "-1 * -9223372036854775808 = -9223372036854775808" {
  assert_eq((-1L).op_mul(-9223372036854775808L), -9223372036854775808L)
}

///|
test "-1 * 9223372036854775807 = -9223372036854775807" {
  assert_eq((-1L).op_mul(9223372036854775807L), -9223372036854775807L)
}

///|
test "1 * 0 = 0" {
  assert_eq(1L.op_mul(0L), 0L)
}

///|
test "1 * -1 = -1" {
  assert_eq(1L.op_mul(-1L), -1L)
}

///|
test "1 * 1 = 1" {
  assert_eq(1L.op_mul(1L), 1L)
}

///|
test "1 * 2147483647 = 2147483647" {
  assert_eq(1L.op_mul(2147483647L), 2147483647L)
}

///|
test "1 * -2147483648 = -2147483648" {
  assert_eq(1L.op_mul(-2147483648L), -2147483648L)
}

///|
test "1 * 2147483648 = 2147483648" {
  assert_eq(1L.op_mul(2147483648L), 2147483648L)
}

///|
test "1 * -2147483649 = -2147483649" {
  assert_eq(1L.op_mul(-2147483649L), -2147483649L)
}

///|
test "1 * 9223372036854775807 = 9223372036854775807" {
  assert_eq(1L.op_mul(9223372036854775807L), 9223372036854775807L)
}

///|
test "1 * -9223372036854775808 = -9223372036854775808" {
  assert_eq(1L.op_mul(-9223372036854775808L), -9223372036854775808L)
}

///|
test "1 * -9223372036854775808 = -9223372036854775808" {
  assert_eq(1L.op_mul(-9223372036854775808L), -9223372036854775808L)
}

///|
test "1 * 9223372036854775807 = 9223372036854775807" {
  assert_eq(1L.op_mul(9223372036854775807L), 9223372036854775807L)
}

///|
test "2147483647 * 0 = 0" {
  assert_eq(2147483647L.op_mul(0L), 0L)
}

///|
test "2147483647 * -1 = -2147483647" {
  assert_eq(2147483647L.op_mul(-1L), -2147483647L)
}

///|
test "2147483647 * 1 = 2147483647" {
  assert_eq(2147483647L.op_mul(1L), 2147483647L)
}

///|
test "2147483647 * 2147483647 = 4611686014132420609" {
  assert_eq(2147483647L.op_mul(2147483647L), 4611686014132420609L)
}

///|
test "2147483647 * -2147483648 = -4611686016279904256" {
  assert_eq(2147483647L.op_mul(-2147483648L), -4611686016279904256L)
}

///|
test "2147483647 * 2147483648 = 4611686016279904256" {
  assert_eq(2147483647L.op_mul(2147483648L), 4611686016279904256L)
}

///|
test "2147483647 * -2147483649 = -4611686018427387903" {
  assert_eq(2147483647L.op_mul(-2147483649L), -4611686018427387903L)
}

///|
test "2147483647 * 9223372036854775807 = 9223372034707292161" {
  assert_eq(2147483647L.op_mul(9223372036854775807L), 9223372034707292161L)
}

///|
test "2147483647 * -9223372036854775808 = -9223372036854775808" {
  assert_eq(2147483647L.op_mul(-9223372036854775808L), -9223372036854775808L)
}

///|
test "2147483647 * -9223372036854775808 = -9223372036854775808" {
  assert_eq(2147483647L.op_mul(-9223372036854775808L), -9223372036854775808L)
}

///|
test "2147483647 * 9223372036854775807 = 9223372034707292161" {
  assert_eq(2147483647L.op_mul(9223372036854775807L), 9223372034707292161L)
}

///|
test "-2147483648 * 0 = 0" {
  assert_eq((-2147483648L).op_mul(0L), 0L)
}

///|
test "-2147483648 * -1 = 2147483648" {
  assert_eq((-2147483648L).op_mul(-1L), 2147483648L)
}

///|
test "-2147483648 * 1 = -2147483648" {
  assert_eq((-2147483648L).op_mul(1L), -2147483648L)
}

///|
test "-2147483648 * 2147483647 = -4611686016279904256" {
  assert_eq((-2147483648L).op_mul(2147483647L), -4611686016279904256L)
}

///|
test "-2147483648 * -2147483648 = 4611686018427387904" {
  assert_eq((-2147483648L).op_mul(-2147483648L), 4611686018427387904L)
}

///|
test "-2147483648 * 2147483648 = -4611686018427387904" {
  assert_eq((-2147483648L).op_mul(2147483648L), -4611686018427387904L)
}

///|
test "-2147483648 * -2147483649 = 4611686020574871552" {
  assert_eq((-2147483648L).op_mul(-2147483649L), 4611686020574871552L)
}

///|
test "-2147483648 * 9223372036854775807 = 2147483648" {
  assert_eq((-2147483648L).op_mul(9223372036854775807L), 2147483648L)
}

///|
test "-2147483648 * -9223372036854775808 = 0" {
  assert_eq((-2147483648L).op_mul(-9223372036854775808L), 0L)
}

///|
test "-2147483648 * -9223372036854775808 = 0" {
  assert_eq((-2147483648L).op_mul(-9223372036854775808L), 0L)
}

///|
test "-2147483648 * 9223372036854775807 = 2147483648" {
  assert_eq((-2147483648L).op_mul(9223372036854775807L), 2147483648L)
}

///|
test "2147483648 * 0 = 0" {
  assert_eq(2147483648L.op_mul(0L), 0L)
}

///|
test "2147483648 * -1 = -2147483648" {
  assert_eq(2147483648L.op_mul(-1L), -2147483648L)
}

///|
test "2147483648 * 1 = 2147483648" {
  assert_eq(2147483648L.op_mul(1L), 2147483648L)
}

///|
test "2147483648 * 2147483647 = 4611686016279904256" {
  assert_eq(2147483648L.op_mul(2147483647L), 4611686016279904256L)
}

///|
test "2147483648 * -2147483648 = -4611686018427387904" {
  assert_eq(2147483648L.op_mul(-2147483648L), -4611686018427387904L)
}

///|
test "2147483648 * 2147483648 = 4611686018427387904" {
  assert_eq(2147483648L.op_mul(2147483648L), 4611686018427387904L)
}

///|
test "2147483648 * -2147483649 = -4611686020574871552" {
  assert_eq(2147483648L.op_mul(-2147483649L), -4611686020574871552L)
}

///|
test "2147483648 * 9223372036854775807 = -2147483648" {
  assert_eq(2147483648L.op_mul(9223372036854775807L), -2147483648L)
}

///|
test "2147483648 * -9223372036854775808 = 0" {
  assert_eq(2147483648L.op_mul(-9223372036854775808L), 0L)
}

///|
test "2147483648 * -9223372036854775808 = 0" {
  assert_eq(2147483648L.op_mul(-9223372036854775808L), 0L)
}

///|
test "2147483648 * 9223372036854775807 = -2147483648" {
  assert_eq(2147483648L.op_mul(9223372036854775807L), -2147483648L)
}

///|
test "-2147483649 * 0 = 0" {
  assert_eq((-2147483649L).op_mul(0L), 0L)
}

///|
test "-2147483649 * -1 = 2147483649" {
  assert_eq((-2147483649L).op_mul(-1L), 2147483649L)
}

///|
test "-2147483649 * 1 = -2147483649" {
  assert_eq((-2147483649L).op_mul(1L), -2147483649L)
}

///|
test "-2147483649 * 2147483647 = -4611686018427387903" {
  assert_eq((-2147483649L).op_mul(2147483647L), -4611686018427387903L)
}

///|
test "-2147483649 * -2147483648 = 4611686020574871552" {
  assert_eq((-2147483649L).op_mul(-2147483648L), 4611686020574871552L)
}

///|
test "-2147483649 * 2147483648 = -4611686020574871552" {
  assert_eq((-2147483649L).op_mul(2147483648L), -4611686020574871552L)
}

///|
test "-2147483649 * -2147483649 = 4611686022722355201" {
  assert_eq((-2147483649L).op_mul(-2147483649L), 4611686022722355201L)
}

///|
test "-2147483649 * 9223372036854775807 = -9223372034707292159" {
  assert_eq((-2147483649L).op_mul(9223372036854775807L), -9223372034707292159L)
}

///|
test "-2147483649 * -9223372036854775808 = -9223372036854775808" {
  assert_eq((-2147483649L).op_mul(-9223372036854775808L), -9223372036854775808L)
}

///|
test "-2147483649 * -9223372036854775808 = -9223372036854775808" {
  assert_eq((-2147483649L).op_mul(-9223372036854775808L), -9223372036854775808L)
}

///|
test "-2147483649 * 9223372036854775807 = -9223372034707292159" {
  assert_eq((-2147483649L).op_mul(9223372036854775807L), -9223372034707292159L)
}

///|
test "9223372036854775807 * 0 = 0" {
  assert_eq(9223372036854775807L.op_mul(0L), 0L)
}

///|
test "9223372036854775807 * -1 = -9223372036854775807" {
  assert_eq(9223372036854775807L.op_mul(-1L), -9223372036854775807L)
}

///|
test "9223372036854775807 * 1 = 9223372036854775807" {
  assert_eq(9223372036854775807L.op_mul(1L), 9223372036854775807L)
}

///|
test "9223372036854775807 * 2147483647 = 9223372034707292161" {
  assert_eq(9223372036854775807L.op_mul(2147483647L), 9223372034707292161L)
}

///|
test "9223372036854775807 * -2147483648 = 2147483648" {
  assert_eq(9223372036854775807L.op_mul(-2147483648L), 2147483648L)
}

///|
test "9223372036854775807 * 2147483648 = -2147483648" {
  assert_eq(9223372036854775807L.op_mul(2147483648L), -2147483648L)
}

///|
test "9223372036854775807 * -2147483649 = -9223372034707292159" {
  assert_eq(9223372036854775807L.op_mul(-2147483649L), -9223372034707292159L)
}

///|
test "9223372036854775807 * 9223372036854775807 = 1" {
  assert_eq(9223372036854775807L.op_mul(9223372036854775807L), 1L)
}

///|
test "9223372036854775807 * -9223372036854775808 = -9223372036854775808" {
  assert_eq(
    9223372036854775807L.op_mul(-9223372036854775808L),
    -9223372036854775808L,
  )
}

///|
test "9223372036854775807 * -9223372036854775808 = -9223372036854775808" {
  assert_eq(
    9223372036854775807L.op_mul(-9223372036854775808L),
    -9223372036854775808L,
  )
}

///|
test "9223372036854775807 * 9223372036854775807 = 1" {
  assert_eq(9223372036854775807L.op_mul(9223372036854775807L), 1L)
}

///|
test "-9223372036854775808 * 0 = 0" {
  assert_eq((-9223372036854775808L).op_mul(0L), 0L)
}

///|
test "-9223372036854775808 * -1 = -9223372036854775808" {
  assert_eq((-9223372036854775808L).op_mul(-1L), -9223372036854775808L)
}

///|
test "-9223372036854775808 * 1 = -9223372036854775808" {
  assert_eq((-9223372036854775808L).op_mul(1L), -9223372036854775808L)
}

///|
test "-9223372036854775808 * 2147483647 = -9223372036854775808" {
  assert_eq((-9223372036854775808L).op_mul(2147483647L), -9223372036854775808L)
}

///|
test "-9223372036854775808 * -2147483648 = 0" {
  assert_eq((-9223372036854775808L).op_mul(-2147483648L), 0L)
}

///|
test "-9223372036854775808 * 2147483648 = 0" {
  assert_eq((-9223372036854775808L).op_mul(2147483648L), 0L)
}

///|
test "-9223372036854775808 * -2147483649 = -9223372036854775808" {
  assert_eq((-9223372036854775808L).op_mul(-2147483649L), -9223372036854775808L)
}

///|
test "-9223372036854775808 * 9223372036854775807 = -9223372036854775808" {
  assert_eq(
    (-9223372036854775808L).op_mul(9223372036854775807L),
    -9223372036854775808L,
  )
}

///|
test "-9223372036854775808 * -9223372036854775808 = 0" {
  assert_eq((-9223372036854775808L).op_mul(-9223372036854775808L), 0L)
}

///|
test "-9223372036854775808 * -9223372036854775808 = 0" {
  assert_eq((-9223372036854775808L).op_mul(-9223372036854775808L), 0L)
}

///|
test "-9223372036854775808 * 9223372036854775807 = -9223372036854775808" {
  assert_eq(
    (-9223372036854775808L).op_mul(9223372036854775807L),
    -9223372036854775808L,
  )
}

///|
test "-9223372036854775808 * 0 = 0" {
  assert_eq((-9223372036854775808L).op_mul(0L), 0L)
}

///|
test "-9223372036854775808 * -1 = -9223372036854775808" {
  assert_eq((-9223372036854775808L).op_mul(-1L), -9223372036854775808L)
}

///|
test "-9223372036854775808 * 1 = -9223372036854775808" {
  assert_eq((-9223372036854775808L).op_mul(1L), -9223372036854775808L)
}

///|
test "-9223372036854775808 * 2147483647 = -9223372036854775808" {
  assert_eq((-9223372036854775808L).op_mul(2147483647L), -9223372036854775808L)
}

///|
test "-9223372036854775808 * -2147483648 = 0" {
  assert_eq((-9223372036854775808L).op_mul(-2147483648L), 0L)
}

///|
test "-9223372036854775808 * 2147483648 = 0" {
  assert_eq((-9223372036854775808L).op_mul(2147483648L), 0L)
}

///|
test "-9223372036854775808 * -2147483649 = -9223372036854775808" {
  assert_eq((-9223372036854775808L).op_mul(-2147483649L), -9223372036854775808L)
}

///|
test "-9223372036854775808 * 9223372036854775807 = -9223372036854775808" {
  assert_eq(
    (-9223372036854775808L).op_mul(9223372036854775807L),
    -9223372036854775808L,
  )
}

///|
test "-9223372036854775808 * -9223372036854775808 = 0" {
  assert_eq((-9223372036854775808L).op_mul(-9223372036854775808L), 0L)
}

///|
test "-9223372036854775808 * -9223372036854775808 = 0" {
  assert_eq((-9223372036854775808L).op_mul(-9223372036854775808L), 0L)
}

///|
test "-9223372036854775808 * 9223372036854775807 = -9223372036854775808" {
  assert_eq(
    (-9223372036854775808L).op_mul(9223372036854775807L),
    -9223372036854775808L,
  )
}

///|
test "9223372036854775807 * 0 = 0" {
  assert_eq(9223372036854775807L.op_mul(0L), 0L)
}

///|
test "9223372036854775807 * -1 = -9223372036854775807" {
  assert_eq(9223372036854775807L.op_mul(-1L), -9223372036854775807L)
}

///|
test "9223372036854775807 * 1 = 9223372036854775807" {
  assert_eq(9223372036854775807L.op_mul(1L), 9223372036854775807L)
}

///|
test "9223372036854775807 * 2147483647 = 9223372034707292161" {
  assert_eq(9223372036854775807L.op_mul(2147483647L), 9223372034707292161L)
}

///|
test "9223372036854775807 * -2147483648 = 2147483648" {
  assert_eq(9223372036854775807L.op_mul(-2147483648L), 2147483648L)
}

///|
test "9223372036854775807 * 2147483648 = -2147483648" {
  assert_eq(9223372036854775807L.op_mul(2147483648L), -2147483648L)
}

///|
test "9223372036854775807 * -2147483649 = -9223372034707292159" {
  assert_eq(9223372036854775807L.op_mul(-2147483649L), -9223372034707292159L)
}

///|
test "9223372036854775807 * 9223372036854775807 = 1" {
  assert_eq(9223372036854775807L.op_mul(9223372036854775807L), 1L)
}

///|
test "9223372036854775807 * -9223372036854775808 = -9223372036854775808" {
  assert_eq(
    9223372036854775807L.op_mul(-9223372036854775808L),
    -9223372036854775808L,
  )
}

///|
test "9223372036854775807 * -9223372036854775808 = -9223372036854775808" {
  assert_eq(
    9223372036854775807L.op_mul(-9223372036854775808L),
    -9223372036854775808L,
  )
}

///|
test "9223372036854775807 * 9223372036854775807 = 1" {
  assert_eq(9223372036854775807L.op_mul(9223372036854775807L), 1L)
}

///|
test "0 / -1 = 0" {
  assert_eq(0L.op_div(-1L), 0L)
}

///|
test "0 / 1 = 0" {
  assert_eq(0L.op_div(1L), 0L)
}

///|
test "0 / 2147483647 = 0" {
  assert_eq(0L.op_div(2147483647L), 0L)
}

///|
test "0 / -2147483648 = 0" {
  assert_eq(0L.op_div(-2147483648L), 0L)
}

///|
test "0 / 2147483648 = 0" {
  assert_eq(0L.op_div(2147483648L), 0L)
}

///|
test "0 / -2147483649 = 0" {
  assert_eq(0L.op_div(-2147483649L), 0L)
}

///|
test "0 / 9223372036854775807 = 0" {
  assert_eq(0L.op_div(9223372036854775807L), 0L)
}

///|
test "0 / -9223372036854775808 = 0" {
  assert_eq(0L.op_div(-9223372036854775808L), 0L)
}

///|
test "0 / -9223372036854775808 = 0" {
  assert_eq(0L.op_div(-9223372036854775808L), 0L)
}

///|
test "0 / 9223372036854775807 = 0" {
  assert_eq(0L.op_div(9223372036854775807L), 0L)
}

///|
test "-1 / -1 = 1" {
  assert_eq((-1L).op_div(-1L), 1L)
}

///|
test "-1 / 1 = -1" {
  assert_eq((-1L).op_div(1L), -1L)
}

///|
test "-1 / 2147483647 = 0" {
  assert_eq((-1L).op_div(2147483647L), 0L)
}

///|
test "-1 / -2147483648 = 0" {
  assert_eq((-1L).op_div(-2147483648L), 0L)
}

///|
test "-1 / 2147483648 = 0" {
  assert_eq((-1L).op_div(2147483648L), 0L)
}

///|
test "-1 / -2147483649 = 0" {
  assert_eq((-1L).op_div(-2147483649L), 0L)
}

///|
test "-1 / 9223372036854775807 = 0" {
  assert_eq((-1L).op_div(9223372036854775807L), 0L)
}

///|
test "-1 / -9223372036854775808 = 0" {
  assert_eq((-1L).op_div(-9223372036854775808L), 0L)
}

///|
test "-1 / -9223372036854775808 = 0" {
  assert_eq((-1L).op_div(-9223372036854775808L), 0L)
}

///|
test "-1 / 9223372036854775807 = 0" {
  assert_eq((-1L).op_div(9223372036854775807L), 0L)
}

///|
test "1 / -1 = -1" {
  assert_eq(1L.op_div(-1L), -1L)
}

///|
test "1 / 1 = 1" {
  assert_eq(1L.op_div(1L), 1L)
}

///|
test "1 / 2147483647 = 0" {
  assert_eq(1L.op_div(2147483647L), 0L)
}

///|
test "1 / -2147483648 = 0" {
  assert_eq(1L.op_div(-2147483648L), 0L)
}

///|
test "1 / 2147483648 = 0" {
  assert_eq(1L.op_div(2147483648L), 0L)
}

///|
test "1 / -2147483649 = 0" {
  assert_eq(1L.op_div(-2147483649L), 0L)
}

///|
test "1 / 9223372036854775807 = 0" {
  assert_eq(1L.op_div(9223372036854775807L), 0L)
}

///|
test "1 / -9223372036854775808 = 0" {
  assert_eq(1L.op_div(-9223372036854775808L), 0L)
}

///|
test "1 / -9223372036854775808 = 0" {
  assert_eq(1L.op_div(-9223372036854775808L), 0L)
}

///|
test "1 / 9223372036854775807 = 0" {
  assert_eq(1L.op_div(9223372036854775807L), 0L)
}

///|
test "2147483647 / -1 = -2147483647" {
  assert_eq(2147483647L.op_div(-1L), -2147483647L)
}

///|
test "2147483647 / 1 = 2147483647" {
  assert_eq(2147483647L.op_div(1L), 2147483647L)
}

///|
test "2147483647 / 2147483647 = 1" {
  assert_eq(2147483647L.op_div(2147483647L), 1L)
}

///|
test "2147483647 / -2147483648 = 0" {
  assert_eq(2147483647L.op_div(-2147483648L), 0L)
}

///|
test "2147483647 / 2147483648 = 0" {
  assert_eq(2147483647L.op_div(2147483648L), 0L)
}

///|
test "2147483647 / -2147483649 = 0" {
  assert_eq(2147483647L.op_div(-2147483649L), 0L)
}

///|
test "2147483647 / 9223372036854775807 = 0" {
  assert_eq(2147483647L.op_div(9223372036854775807L), 0L)
}

///|
test "2147483647 / -9223372036854775808 = 0" {
  assert_eq(2147483647L.op_div(-9223372036854775808L), 0L)
}

///|
test "2147483647 / -9223372036854775808 = 0" {
  assert_eq(2147483647L.op_div(-9223372036854775808L), 0L)
}

///|
test "2147483647 / 9223372036854775807 = 0" {
  assert_eq(2147483647L.op_div(9223372036854775807L), 0L)
}

///|
test "-2147483648 / -1 = 2147483648" {
  assert_eq((-2147483648L).op_div(-1L), 2147483648L)
}

///|
test "-2147483648 / 1 = -2147483648" {
  assert_eq((-2147483648L).op_div(1L), -2147483648L)
}

///|
test "-2147483648 / 2147483647 = -1" {
  assert_eq((-2147483648L).op_div(2147483647L), -1L)
}

///|
test "-2147483648 / -2147483648 = 1" {
  assert_eq((-2147483648L).op_div(-2147483648L), 1L)
}

///|
test "-2147483648 / 2147483648 = -1" {
  assert_eq((-2147483648L).op_div(2147483648L), -1L)
}

///|
test "-2147483648 / -2147483649 = 0" {
  assert_eq((-2147483648L).op_div(-2147483649L), 0L)
}

///|
test "-2147483648 / 9223372036854775807 = 0" {
  assert_eq((-2147483648L).op_div(9223372036854775807L), 0L)
}

///|
test "-2147483648 / -9223372036854775808 = 0" {
  assert_eq((-2147483648L).op_div(-9223372036854775808L), 0L)
}

///|
test "-2147483648 / -9223372036854775808 = 0" {
  assert_eq((-2147483648L).op_div(-9223372036854775808L), 0L)
}

///|
test "-2147483648 / 9223372036854775807 = 0" {
  assert_eq((-2147483648L).op_div(9223372036854775807L), 0L)
}

///|
test "2147483648 / -1 = -2147483648" {
  assert_eq(2147483648L.op_div(-1L), -2147483648L)
}

///|
test "2147483648 / 1 = 2147483648" {
  assert_eq(2147483648L.op_div(1L), 2147483648L)
}

///|
test "2147483648 / 2147483647 = 1" {
  assert_eq(2147483648L.op_div(2147483647L), 1L)
}

///|
test "2147483648 / -2147483648 = -1" {
  assert_eq(2147483648L.op_div(-2147483648L), -1L)
}

///|
test "2147483648 / 2147483648 = 1" {
  assert_eq(2147483648L.op_div(2147483648L), 1L)
}

///|
test "2147483648 / -2147483649 = 0" {
  assert_eq(2147483648L.op_div(-2147483649L), 0L)
}

///|
test "2147483648 / 9223372036854775807 = 0" {
  assert_eq(2147483648L.op_div(9223372036854775807L), 0L)
}

///|
test "2147483648 / -9223372036854775808 = 0" {
  assert_eq(2147483648L.op_div(-9223372036854775808L), 0L)
}

///|
test "2147483648 / -9223372036854775808 = 0" {
  assert_eq(2147483648L.op_div(-9223372036854775808L), 0L)
}

///|
test "2147483648 / 9223372036854775807 = 0" {
  assert_eq(2147483648L.op_div(9223372036854775807L), 0L)
}

///|
test "-2147483649 / -1 = 2147483649" {
  assert_eq((-2147483649L).op_div(-1L), 2147483649L)
}

///|
test "-2147483649 / 1 = -2147483649" {
  assert_eq((-2147483649L).op_div(1L), -2147483649L)
}

///|
test "-2147483649 / 2147483647 = -1" {
  assert_eq((-2147483649L).op_div(2147483647L), -1L)
}

///|
test "-2147483649 / -2147483648 = 1" {
  assert_eq((-2147483649L).op_div(-2147483648L), 1L)
}

///|
test "-2147483649 / 2147483648 = -1" {
  assert_eq((-2147483649L).op_div(2147483648L), -1L)
}

///|
test "-2147483649 / -2147483649 = 1" {
  assert_eq((-2147483649L).op_div(-2147483649L), 1L)
}

///|
test "-2147483649 / 9223372036854775807 = 0" {
  assert_eq((-2147483649L).op_div(9223372036854775807L), 0L)
}

///|
test "-2147483649 / -9223372036854775808 = 0" {
  assert_eq((-2147483649L).op_div(-9223372036854775808L), 0L)
}

///|
test "-2147483649 / -9223372036854775808 = 0" {
  assert_eq((-2147483649L).op_div(-9223372036854775808L), 0L)
}

///|
test "-2147483649 / 9223372036854775807 = 0" {
  assert_eq((-2147483649L).op_div(9223372036854775807L), 0L)
}

///|
test "9223372036854775807 / -1 = -9223372036854775807" {
  assert_eq(9223372036854775807L.op_div(-1L), -9223372036854775807L)
}

///|
test "9223372036854775807 / 1 = 9223372036854775807" {
  assert_eq(9223372036854775807L.op_div(1L), 9223372036854775807L)
}

///|
test "9223372036854775807 / 2147483647 = 4294967298" {
  assert_eq(9223372036854775807L.op_div(2147483647L), 4294967298L)
}

///|
test "9223372036854775807 / -2147483648 = -4294967295" {
  assert_eq(9223372036854775807L.op_div(-2147483648L), -4294967295L)
}

///|
test "9223372036854775807 / 2147483648 = 4294967295" {
  assert_eq(9223372036854775807L.op_div(2147483648L), 4294967295L)
}

///|
test "9223372036854775807 / -2147483649 = -4294967294" {
  assert_eq(9223372036854775807L.op_div(-2147483649L), -4294967294L)
}

///|
test "9223372036854775807 / 9223372036854775807 = 1" {
  assert_eq(9223372036854775807L.op_div(9223372036854775807L), 1L)
}

///|
test "9223372036854775807 / -9223372036854775808 = 0" {
  assert_eq(9223372036854775807L.op_div(-9223372036854775808L), 0L)
}

///|
test "9223372036854775807 / -9223372036854775808 = 0" {
  assert_eq(9223372036854775807L.op_div(-9223372036854775808L), 0L)
}

///|
test "9223372036854775807 / 9223372036854775807 = 1" {
  assert_eq(9223372036854775807L.op_div(9223372036854775807L), 1L)
}

///|
test "-9223372036854775808 / 1 = -9223372036854775808" {
  assert_eq((-9223372036854775808L).op_div(1L), -9223372036854775808L)
}

///|
test "-9223372036854775808 / 2147483647 = -4294967298" {
  assert_eq((-9223372036854775808L).op_div(2147483647L), -4294967298L)
}

///|
test "-9223372036854775808 / -2147483648 = 4294967296" {
  assert_eq((-9223372036854775808L).op_div(-2147483648L), 4294967296L)
}

///|
test "-9223372036854775808 / 2147483648 = -4294967296" {
  assert_eq((-9223372036854775808L).op_div(2147483648L), -4294967296L)
}

///|
test "-9223372036854775808 / -2147483649 = 4294967294" {
  assert_eq((-9223372036854775808L).op_div(-2147483649L), 4294967294L)
}

///|
test "-9223372036854775808 / 9223372036854775807 = -1" {
  assert_eq((-9223372036854775808L).op_div(9223372036854775807L), -1L)
}

///|
test "-9223372036854775808 / -9223372036854775808 = 1" {
  assert_eq((-9223372036854775808L).op_div(-9223372036854775808L), 1L)
}

///|
test "-9223372036854775808 / -9223372036854775808 = 1" {
  assert_eq((-9223372036854775808L).op_div(-9223372036854775808L), 1L)
}

///|
test "-9223372036854775808 / 9223372036854775807 = -1" {
  assert_eq((-9223372036854775808L).op_div(9223372036854775807L), -1L)
}

///|
test "-9223372036854775808 / 1 = -9223372036854775808" {
  assert_eq((-9223372036854775808L).op_div(1L), -9223372036854775808L)
}

///|
test "-9223372036854775808 / 2147483647 = -4294967298" {
  assert_eq((-9223372036854775808L).op_div(2147483647L), -4294967298L)
}

///|
test "-9223372036854775808 / -2147483648 = 4294967296" {
  assert_eq((-9223372036854775808L).op_div(-2147483648L), 4294967296L)
}

///|
test "-9223372036854775808 / 2147483648 = -4294967296" {
  assert_eq((-9223372036854775808L).op_div(2147483648L), -4294967296L)
}

///|
test "-9223372036854775808 / -2147483649 = 4294967294" {
  assert_eq((-9223372036854775808L).op_div(-2147483649L), 4294967294L)
}

///|
test "-9223372036854775808 / 9223372036854775807 = -1" {
  assert_eq((-9223372036854775808L).op_div(9223372036854775807L), -1L)
}

///|
test "-9223372036854775808 / -9223372036854775808 = 1" {
  assert_eq((-9223372036854775808L).op_div(-9223372036854775808L), 1L)
}

///|
test "-9223372036854775808 / -9223372036854775808 = 1" {
  assert_eq((-9223372036854775808L).op_div(-9223372036854775808L), 1L)
}

///|
test "-9223372036854775808 / 9223372036854775807 = -1" {
  assert_eq((-9223372036854775808L).op_div(9223372036854775807L), -1L)
}

///|
test "9223372036854775807 / -1 = -9223372036854775807" {
  assert_eq(9223372036854775807L.op_div(-1L), -9223372036854775807L)
}

///|
test "9223372036854775807 / 1 = 9223372036854775807" {
  assert_eq(9223372036854775807L.op_div(1L), 9223372036854775807L)
}

///|
test "9223372036854775807 / 2147483647 = 4294967298" {
  assert_eq(9223372036854775807L.op_div(2147483647L), 4294967298L)
}

///|
test "9223372036854775807 / -2147483648 = -4294967295" {
  assert_eq(9223372036854775807L.op_div(-2147483648L), -4294967295L)
}

///|
test "9223372036854775807 / 2147483648 = 4294967295" {
  assert_eq(9223372036854775807L.op_div(2147483648L), 4294967295L)
}

///|
test "9223372036854775807 / -2147483649 = -4294967294" {
  assert_eq(9223372036854775807L.op_div(-2147483649L), -4294967294L)
}

///|
test "9223372036854775807 / 9223372036854775807 = 1" {
  assert_eq(9223372036854775807L.op_div(9223372036854775807L), 1L)
}

///|
test "9223372036854775807 / -9223372036854775808 = 0" {
  assert_eq(9223372036854775807L.op_div(-9223372036854775808L), 0L)
}

///|
test "9223372036854775807 / -9223372036854775808 = 0" {
  assert_eq(9223372036854775807L.op_div(-9223372036854775808L), 0L)
}

///|
test "9223372036854775807 / 9223372036854775807 = 1" {
  assert_eq(9223372036854775807L.op_div(9223372036854775807L), 1L)
}

///|
test "0 % -1 = 0" {
  assert_eq(0L.op_mod(-1L), 0L)
}

///|
test "0 % 1 = 0" {
  assert_eq(0L.op_mod(1L), 0L)
}

///|
test "0 % 2147483647 = 0" {
  assert_eq(0L.op_mod(2147483647L), 0L)
}

///|
test "0 % -2147483648 = 0" {
  assert_eq(0L.op_mod(-2147483648L), 0L)
}

///|
test "0 % 2147483648 = 0" {
  assert_eq(0L.op_mod(2147483648L), 0L)
}

///|
test "0 % -2147483649 = 0" {
  assert_eq(0L.op_mod(-2147483649L), 0L)
}

///|
test "0 % 9223372036854775807 = 0" {
  assert_eq(0L.op_mod(9223372036854775807L), 0L)
}

///|
test "0 % -9223372036854775808 = 0" {
  assert_eq(0L.op_mod(-9223372036854775808L), 0L)
}

///|
test "0 % -9223372036854775808 = 0" {
  assert_eq(0L.op_mod(-9223372036854775808L), 0L)
}

///|
test "0 % 9223372036854775807 = 0" {
  assert_eq(0L.op_mod(9223372036854775807L), 0L)
}

///|
test "-1 % -1 = 0" {
  assert_eq((-1L).op_mod(-1L), 0L)
}

///|
test "-1 % 1 = 0" {
  assert_eq((-1L).op_mod(1L), 0L)
}

///|
test "-1 % 2147483647 = -1" {
  assert_eq((-1L).op_mod(2147483647L), -1L)
}

///|
test "-1 % -2147483648 = -1" {
  assert_eq((-1L).op_mod(-2147483648L), -1L)
}

///|
test "-1 % 2147483648 = -1" {
  assert_eq((-1L).op_mod(2147483648L), -1L)
}

///|
test "-1 % -2147483649 = -1" {
  assert_eq((-1L).op_mod(-2147483649L), -1L)
}

///|
test "-1 % 9223372036854775807 = -1" {
  assert_eq((-1L).op_mod(9223372036854775807L), -1L)
}

///|
test "-1 % -9223372036854775808 = -1" {
  assert_eq((-1L).op_mod(-9223372036854775808L), -1L)
}

///|
test "-1 % -9223372036854775808 = -1" {
  assert_eq((-1L).op_mod(-9223372036854775808L), -1L)
}

///|
test "-1 % 9223372036854775807 = -1" {
  assert_eq((-1L).op_mod(9223372036854775807L), -1L)
}

///|
test "1 % -1 = 0" {
  assert_eq(1L.op_mod(-1L), 0L)
}

///|
test "1 % 1 = 0" {
  assert_eq(1L.op_mod(1L), 0L)
}

///|
test "1 % 2147483647 = 1" {
  assert_eq(1L.op_mod(2147483647L), 1L)
}

///|
test "1 % -2147483648 = 1" {
  assert_eq(1L.op_mod(-2147483648L), 1L)
}

///|
test "1 % 2147483648 = 1" {
  assert_eq(1L.op_mod(2147483648L), 1L)
}

///|
test "1 % -2147483649 = 1" {
  assert_eq(1L.op_mod(-2147483649L), 1L)
}

///|
test "1 % 9223372036854775807 = 1" {
  assert_eq(1L.op_mod(9223372036854775807L), 1L)
}

///|
test "1 % -9223372036854775808 = 1" {
  assert_eq(1L.op_mod(-9223372036854775808L), 1L)
}

///|
test "1 % -9223372036854775808 = 1" {
  assert_eq(1L.op_mod(-9223372036854775808L), 1L)
}

///|
test "1 % 9223372036854775807 = 1" {
  assert_eq(1L.op_mod(9223372036854775807L), 1L)
}

///|
test "2147483647 % -1 = 0" {
  assert_eq(2147483647L.op_mod(-1L), 0L)
}

///|
test "2147483647 % 1 = 0" {
  assert_eq(2147483647L.op_mod(1L), 0L)
}

///|
test "2147483647 % 2147483647 = 0" {
  assert_eq(2147483647L.op_mod(2147483647L), 0L)
}

///|
test "2147483647 % -2147483648 = 2147483647" {
  assert_eq(2147483647L.op_mod(-2147483648L), 2147483647L)
}

///|
test "2147483647 % 2147483648 = 2147483647" {
  assert_eq(2147483647L.op_mod(2147483648L), 2147483647L)
}

///|
test "2147483647 % -2147483649 = 2147483647" {
  assert_eq(2147483647L.op_mod(-2147483649L), 2147483647L)
}

///|
test "2147483647 % 9223372036854775807 = 2147483647" {
  assert_eq(2147483647L.op_mod(9223372036854775807L), 2147483647L)
}

///|
test "2147483647 % -9223372036854775808 = 2147483647" {
  assert_eq(2147483647L.op_mod(-9223372036854775808L), 2147483647L)
}

///|
test "2147483647 % -9223372036854775808 = 2147483647" {
  assert_eq(2147483647L.op_mod(-9223372036854775808L), 2147483647L)
}

///|
test "2147483647 % 9223372036854775807 = 2147483647" {
  assert_eq(2147483647L.op_mod(9223372036854775807L), 2147483647L)
}

///|
test "-2147483648 % -1 = 0" {
  assert_eq((-2147483648L).op_mod(-1L), 0L)
}

///|
test "-2147483648 % 1 = 0" {
  assert_eq((-2147483648L).op_mod(1L), 0L)
}

///|
test "-2147483648 % 2147483647 = -1" {
  assert_eq((-2147483648L).op_mod(2147483647L), -1L)
}

///|
test "-2147483648 % -2147483648 = 0" {
  assert_eq((-2147483648L).op_mod(-2147483648L), 0L)
}

///|
test "-2147483648 % 2147483648 = 0" {
  assert_eq((-2147483648L).op_mod(2147483648L), 0L)
}

///|
test "-2147483648 % -2147483649 = -2147483648" {
  assert_eq((-2147483648L).op_mod(-2147483649L), -2147483648L)
}

///|
test "-2147483648 % 9223372036854775807 = -2147483648" {
  assert_eq((-2147483648L).op_mod(9223372036854775807L), -2147483648L)
}

///|
test "-2147483648 % -9223372036854775808 = -2147483648" {
  assert_eq((-2147483648L).op_mod(-9223372036854775808L), -2147483648L)
}

///|
test "-2147483648 % -9223372036854775808 = -2147483648" {
  assert_eq((-2147483648L).op_mod(-9223372036854775808L), -2147483648L)
}

///|
test "-2147483648 % 9223372036854775807 = -2147483648" {
  assert_eq((-2147483648L).op_mod(9223372036854775807L), -2147483648L)
}

///|
test "2147483648 % -1 = 0" {
  assert_eq(2147483648L.op_mod(-1L), 0L)
}

///|
test "2147483648 % 1 = 0" {
  assert_eq(2147483648L.op_mod(1L), 0L)
}

///|
test "2147483648 % 2147483647 = 1" {
  assert_eq(2147483648L.op_mod(2147483647L), 1L)
}

///|
test "2147483648 % -2147483648 = 0" {
  assert_eq(2147483648L.op_mod(-2147483648L), 0L)
}

///|
test "2147483648 % 2147483648 = 0" {
  assert_eq(2147483648L.op_mod(2147483648L), 0L)
}

///|
test "2147483648 % -2147483649 = 2147483648" {
  assert_eq(2147483648L.op_mod(-2147483649L), 2147483648L)
}

///|
test "2147483648 % 9223372036854775807 = 2147483648" {
  assert_eq(2147483648L.op_mod(9223372036854775807L), 2147483648L)
}

///|
test "2147483648 % -9223372036854775808 = 2147483648" {
  assert_eq(2147483648L.op_mod(-9223372036854775808L), 2147483648L)
}

///|
test "2147483648 % -9223372036854775808 = 2147483648" {
  assert_eq(2147483648L.op_mod(-9223372036854775808L), 2147483648L)
}

///|
test "2147483648 % 9223372036854775807 = 2147483648" {
  assert_eq(2147483648L.op_mod(9223372036854775807L), 2147483648L)
}

///|
test "-2147483649 % -1 = 0" {
  assert_eq((-2147483649L).op_mod(-1L), 0L)
}

///|
test "-2147483649 % 1 = 0" {
  assert_eq((-2147483649L).op_mod(1L), 0L)
}

///|
test "-2147483649 % 2147483647 = -2" {
  assert_eq((-2147483649L).op_mod(2147483647L), -2L)
}

///|
test "-2147483649 % -2147483648 = -1" {
  assert_eq((-2147483649L).op_mod(-2147483648L), -1L)
}

///|
test "-2147483649 % 2147483648 = -1" {
  assert_eq((-2147483649L).op_mod(2147483648L), -1L)
}

///|
test "-2147483649 % -2147483649 = 0" {
  assert_eq((-2147483649L).op_mod(-2147483649L), 0L)
}

///|
test "-2147483649 % 9223372036854775807 = -2147483649" {
  assert_eq((-2147483649L).op_mod(9223372036854775807L), -2147483649L)
}

///|
test "-2147483649 % -9223372036854775808 = -2147483649" {
  assert_eq((-2147483649L).op_mod(-9223372036854775808L), -2147483649L)
}

///|
test "-2147483649 % -9223372036854775808 = -2147483649" {
  assert_eq((-2147483649L).op_mod(-9223372036854775808L), -2147483649L)
}

///|
test "-2147483649 % 9223372036854775807 = -2147483649" {
  assert_eq((-2147483649L).op_mod(9223372036854775807L), -2147483649L)
}

///|
test "9223372036854775807 % -1 = 0" {
  assert_eq(9223372036854775807L.op_mod(-1L), 0L)
}

///|
test "9223372036854775807 % 1 = 0" {
  assert_eq(9223372036854775807L.op_mod(1L), 0L)
}

///|
test "9223372036854775807 % 2147483647 = 1" {
  assert_eq(9223372036854775807L.op_mod(2147483647L), 1L)
}

///|
test "9223372036854775807 % -2147483648 = 2147483647" {
  assert_eq(9223372036854775807L.op_mod(-2147483648L), 2147483647L)
}

///|
test "9223372036854775807 % 2147483648 = 2147483647" {
  assert_eq(9223372036854775807L.op_mod(2147483648L), 2147483647L)
}

///|
test "9223372036854775807 % -2147483649 = 1" {
  assert_eq(9223372036854775807L.op_mod(-2147483649L), 1L)
}

///|
test "9223372036854775807 % 9223372036854775807 = 0" {
  assert_eq(9223372036854775807L.op_mod(9223372036854775807L), 0L)
}

///|
test "9223372036854775807 % -9223372036854775808 = 9223372036854775807" {
  assert_eq(
    9223372036854775807L.op_mod(-9223372036854775808L),
    9223372036854775807L,
  )
}

///|
test "9223372036854775807 % -9223372036854775808 = 9223372036854775807" {
  assert_eq(
    9223372036854775807L.op_mod(-9223372036854775808L),
    9223372036854775807L,
  )
}

///|
test "9223372036854775807 % 9223372036854775807 = 0" {
  assert_eq(9223372036854775807L.op_mod(9223372036854775807L), 0L)
}

///|
test "-9223372036854775808 % 1 = 0" {
  assert_eq((-9223372036854775808L).op_mod(1L), 0L)
}

///|
test "-9223372036854775808 % 2147483647 = -2" {
  assert_eq((-9223372036854775808L).op_mod(2147483647L), -2L)
}

///|
test "-9223372036854775808 % -2147483648 = 0" {
  assert_eq((-9223372036854775808L).op_mod(-2147483648L), 0L)
}

///|
test "-9223372036854775808 % 2147483648 = 0" {
  assert_eq((-9223372036854775808L).op_mod(2147483648L), 0L)
}

///|
test "-9223372036854775808 % -2147483649 = -2" {
  assert_eq((-9223372036854775808L).op_mod(-2147483649L), -2L)
}

///|
test "-9223372036854775808 % 9223372036854775807 = -1" {
  assert_eq((-9223372036854775808L).op_mod(9223372036854775807L), -1L)
}

///|
test "-9223372036854775808 % -9223372036854775808 = 0" {
  assert_eq((-9223372036854775808L).op_mod(-9223372036854775808L), 0L)
}

///|
test "-9223372036854775808 % -9223372036854775808 = 0" {
  assert_eq((-9223372036854775808L).op_mod(-9223372036854775808L), 0L)
}

///|
test "-9223372036854775808 % 9223372036854775807 = -1" {
  assert_eq((-9223372036854775808L).op_mod(9223372036854775807L), -1L)
}

///|
test "-9223372036854775808 % 1 = 0" {
  assert_eq((-9223372036854775808L).op_mod(1L), 0L)
}

///|
test "-9223372036854775808 % 2147483647 = -2" {
  assert_eq((-9223372036854775808L).op_mod(2147483647L), -2L)
}

///|
test "-9223372036854775808 % -2147483648 = 0" {
  assert_eq((-9223372036854775808L).op_mod(-2147483648L), 0L)
}

///|
test "-9223372036854775808 % 2147483648 = 0" {
  assert_eq((-9223372036854775808L).op_mod(2147483648L), 0L)
}

///|
test "-9223372036854775808 % -2147483649 = -2" {
  assert_eq((-9223372036854775808L).op_mod(-2147483649L), -2L)
}

///|
test "-9223372036854775808 % 9223372036854775807 = -1" {
  assert_eq((-9223372036854775808L).op_mod(9223372036854775807L), -1L)
}

///|
test "-9223372036854775808 % -9223372036854775808 = 0" {
  assert_eq((-9223372036854775808L).op_mod(-9223372036854775808L), 0L)
}

///|
test "-9223372036854775808 % -9223372036854775808 = 0" {
  assert_eq((-9223372036854775808L).op_mod(-9223372036854775808L), 0L)
}

///|
test "-9223372036854775808 % 9223372036854775807 = -1" {
  assert_eq((-9223372036854775808L).op_mod(9223372036854775807L), -1L)
}

///|
test "9223372036854775807 % -1 = 0" {
  assert_eq(9223372036854775807L.op_mod(-1L), 0L)
}

///|
test "9223372036854775807 % 1 = 0" {
  assert_eq(9223372036854775807L.op_mod(1L), 0L)
}

///|
test "9223372036854775807 % 2147483647 = 1" {
  assert_eq(9223372036854775807L.op_mod(2147483647L), 1L)
}

///|
test "9223372036854775807 % -2147483648 = 2147483647" {
  assert_eq(9223372036854775807L.op_mod(-2147483648L), 2147483647L)
}

///|
test "9223372036854775807 % 2147483648 = 2147483647" {
  assert_eq(9223372036854775807L.op_mod(2147483648L), 2147483647L)
}

///|
test "9223372036854775807 % -2147483649 = 1" {
  assert_eq(9223372036854775807L.op_mod(-2147483649L), 1L)
}

///|
test "9223372036854775807 % 9223372036854775807 = 0" {
  assert_eq(9223372036854775807L.op_mod(9223372036854775807L), 0L)
}

///|
test "9223372036854775807 % -9223372036854775808 = 9223372036854775807" {
  assert_eq(
    9223372036854775807L.op_mod(-9223372036854775808L),
    9223372036854775807L,
  )
}

///|
test "9223372036854775807 % -9223372036854775808 = 9223372036854775807" {
  assert_eq(
    9223372036854775807L.op_mod(-9223372036854775808L),
    9223372036854775807L,
  )
}

///|
test "9223372036854775807 % 9223372036854775807 = 0" {
  assert_eq(9223372036854775807L.op_mod(9223372036854775807L), 0L)
}

///|
fn test_mod_u(x : Int64, y : Int64) -> Int64 {
  (x.reinterpret_as_uint64() % y.reinterpret_as_uint64()).reinterpret_as_int64()
}

///|
test "0 %u -1 = 0" {
  assert_eq(test_mod_u(0L, -1L), 0L)
}

///|
test "0 %u 1 = 0" {
  assert_eq(test_mod_u(0L, 1L), 0L)
}

///|
test "0 %u 2147483647 = 0" {
  assert_eq(test_mod_u(0L, 2147483647L), 0L)
}

///|
test "0 %u -2147483648 = 0" {
  assert_eq(test_mod_u(0L, -2147483648L), 0L)
}

///|
test "0 %u 2147483648 = 0" {
  assert_eq(test_mod_u(0L, 2147483648L), 0L)
}

///|
test "0 %u -2147483649 = 0" {
  assert_eq(test_mod_u(0L, -2147483649L), 0L)
}

///|
test "0 %u 9223372036854775807 = 0" {
  assert_eq(test_mod_u(0L, 9223372036854775807L), 0L)
}

///|
test "0 %u -9223372036854775808 = 0" {
  assert_eq(test_mod_u(0L, -9223372036854775808L), 0L)
}

///|
test "0 %u -9223372036854775808 = 0" {
  assert_eq(test_mod_u(0L, -9223372036854775808L), 0L)
}

///|
test "0 %u 9223372036854775807 = 0" {
  assert_eq(test_mod_u(0L, 9223372036854775807L), 0L)
}

///|
test "-1 %u -1 = 0" {
  assert_eq(test_mod_u(-1L, -1L), 0L)
}

///|
test "-1 %u 1 = 0" {
  assert_eq(test_mod_u(-1L, 1L), 0L)
}

///|
test "-1 %u 2147483647 = 3" {
  assert_eq(test_mod_u(-1L, 2147483647L), 3L)
}

///|
test "-1 %u -2147483648 = 2147483647" {
  assert_eq(test_mod_u(-1L, -2147483648L), 2147483647L)
}

///|
test "-1 %u 2147483648 = 2147483647" {
  assert_eq(test_mod_u(-1L, 2147483648L), 2147483647L)
}

///|
test "-1 %u -2147483649 = 2147483648" {
  assert_eq(test_mod_u(-1L, -2147483649L), 2147483648L)
}

///|
test "-1 %u 9223372036854775807 = 1" {
  assert_eq(test_mod_u(-1L, 9223372036854775807L), 1L)
}

///|
test "-1 %u -9223372036854775808 = 9223372036854775807" {
  assert_eq(test_mod_u(-1L, -9223372036854775808L), 9223372036854775807L)
}

///|
test "-1 %u -9223372036854775808 = 9223372036854775807" {
  assert_eq(test_mod_u(-1L, -9223372036854775808L), 9223372036854775807L)
}

///|
test "-1 %u 9223372036854775807 = 1" {
  assert_eq(test_mod_u(-1L, 9223372036854775807L), 1L)
}

///|
test "1 %u -1 = 1" {
  assert_eq(test_mod_u(1L, -1L), 1L)
}

///|
test "1 %u 1 = 0" {
  assert_eq(test_mod_u(1L, 1L), 0L)
}

///|
test "1 %u 2147483647 = 1" {
  assert_eq(test_mod_u(1L, 2147483647L), 1L)
}

///|
test "1 %u -2147483648 = 1" {
  assert_eq(test_mod_u(1L, -2147483648L), 1L)
}

///|
test "1 %u 2147483648 = 1" {
  assert_eq(test_mod_u(1L, 2147483648L), 1L)
}

///|
test "1 %u -2147483649 = 1" {
  assert_eq(test_mod_u(1L, -2147483649L), 1L)
}

///|
test "1 %u 9223372036854775807 = 1" {
  assert_eq(test_mod_u(1L, 9223372036854775807L), 1L)
}

///|
test "1 %u -9223372036854775808 = 1" {
  assert_eq(test_mod_u(1L, -9223372036854775808L), 1L)
}

///|
test "1 %u -9223372036854775808 = 1" {
  assert_eq(test_mod_u(1L, -9223372036854775808L), 1L)
}

///|
test "1 %u 9223372036854775807 = 1" {
  assert_eq(test_mod_u(1L, 9223372036854775807L), 1L)
}

///|
test "2147483647 %u -1 = 2147483647" {
  assert_eq(test_mod_u(2147483647L, -1L), 2147483647L)
}

///|
test "2147483647 %u 1 = 0" {
  assert_eq(test_mod_u(2147483647L, 1L), 0L)
}

///|
test "2147483647 %u 2147483647 = 0" {
  assert_eq(test_mod_u(2147483647L, 2147483647L), 0L)
}

///|
test "2147483647 %u -2147483648 = 2147483647" {
  assert_eq(test_mod_u(2147483647L, -2147483648L), 2147483647L)
}

///|
test "2147483647 %u 2147483648 = 2147483647" {
  assert_eq(test_mod_u(2147483647L, 2147483648L), 2147483647L)
}

///|
test "2147483647 %u -2147483649 = 2147483647" {
  assert_eq(test_mod_u(2147483647L, -2147483649L), 2147483647L)
}

///|
test "2147483647 %u 9223372036854775807 = 2147483647" {
  assert_eq(test_mod_u(2147483647L, 9223372036854775807L), 2147483647L)
}

///|
test "2147483647 %u -9223372036854775808 = 2147483647" {
  assert_eq(test_mod_u(2147483647L, -9223372036854775808L), 2147483647L)
}

///|
test "2147483647 %u -9223372036854775808 = 2147483647" {
  assert_eq(test_mod_u(2147483647L, -9223372036854775808L), 2147483647L)
}

///|
test "2147483647 %u 9223372036854775807 = 2147483647" {
  assert_eq(test_mod_u(2147483647L, 9223372036854775807L), 2147483647L)
}

///|
test "-2147483648 %u -1 = -2147483648" {
  assert_eq(test_mod_u(-2147483648L, -1L), -2147483648L)
}

///|
test "-2147483648 %u 1 = 0" {
  assert_eq(test_mod_u(-2147483648L, 1L), 0L)
}

///|
test "-2147483648 %u 2147483647 = 3" {
  assert_eq(test_mod_u(-2147483648L, 2147483647L), 3L)
}

///|
test "-2147483648 %u -2147483648 = 0" {
  assert_eq(test_mod_u(-2147483648L, -2147483648L), 0L)
}

///|
test "-2147483648 %u 2147483648 = 0" {
  assert_eq(test_mod_u(-2147483648L, 2147483648L), 0L)
}

///|
test "-2147483648 %u -2147483649 = 1" {
  assert_eq(test_mod_u(-2147483648L, -2147483649L), 1L)
}

///|
test "-2147483648 %u 9223372036854775807 = 9223372034707292161" {
  assert_eq(
    test_mod_u(-2147483648L, 9223372036854775807L),
    9223372034707292161L,
  )
}

///|
test "-2147483648 %u -9223372036854775808 = 9223372034707292160" {
  assert_eq(
    test_mod_u(-2147483648L, -9223372036854775808L),
    9223372034707292160L,
  )
}

///|
test "-2147483648 %u -9223372036854775808 = 9223372034707292160" {
  assert_eq(
    test_mod_u(-2147483648L, -9223372036854775808L),
    9223372034707292160L,
  )
}

///|
test "-2147483648 %u 9223372036854775807 = 9223372034707292161" {
  assert_eq(
    test_mod_u(-2147483648L, 9223372036854775807L),
    9223372034707292161L,
  )
}

///|
test "2147483648 %u -1 = 2147483648" {
  assert_eq(test_mod_u(2147483648L, -1L), 2147483648L)
}

///|
test "2147483648 %u 1 = 0" {
  assert_eq(test_mod_u(2147483648L, 1L), 0L)
}

///|
test "2147483648 %u 2147483647 = 1" {
  assert_eq(test_mod_u(2147483648L, 2147483647L), 1L)
}

///|
test "2147483648 %u -2147483648 = 2147483648" {
  assert_eq(test_mod_u(2147483648L, -2147483648L), 2147483648L)
}

///|
test "2147483648 %u 2147483648 = 0" {
  assert_eq(test_mod_u(2147483648L, 2147483648L), 0L)
}

///|
test "2147483648 %u -2147483649 = 2147483648" {
  assert_eq(test_mod_u(2147483648L, -2147483649L), 2147483648L)
}

///|
test "2147483648 %u 9223372036854775807 = 2147483648" {
  assert_eq(test_mod_u(2147483648L, 9223372036854775807L), 2147483648L)
}

///|
test "2147483648 %u -9223372036854775808 = 2147483648" {
  assert_eq(test_mod_u(2147483648L, -9223372036854775808L), 2147483648L)
}

///|
test "2147483648 %u -9223372036854775808 = 2147483648" {
  assert_eq(test_mod_u(2147483648L, -9223372036854775808L), 2147483648L)
}

///|
test "2147483648 %u 9223372036854775807 = 2147483648" {
  assert_eq(test_mod_u(2147483648L, 9223372036854775807L), 2147483648L)
}

///|
test "-2147483649 %u -1 = -2147483649" {
  assert_eq(test_mod_u(-2147483649L, -1L), -2147483649L)
}

///|
test "-2147483649 %u 1 = 0" {
  assert_eq(test_mod_u(-2147483649L, 1L), 0L)
}

///|
test "-2147483649 %u 2147483647 = 2" {
  assert_eq(test_mod_u(-2147483649L, 2147483647L), 2L)
}

///|
test "-2147483649 %u -2147483648 = -2147483649" {
  assert_eq(test_mod_u(-2147483649L, -2147483648L), -2147483649L)
}

///|
test "-2147483649 %u 2147483648 = 2147483647" {
  assert_eq(test_mod_u(-2147483649L, 2147483648L), 2147483647L)
}

///|
test "-2147483649 %u -2147483649 = 0" {
  assert_eq(test_mod_u(-2147483649L, -2147483649L), 0L)
}

///|
test "-2147483649 %u 9223372036854775807 = 9223372034707292160" {
  assert_eq(
    test_mod_u(-2147483649L, 9223372036854775807L),
    9223372034707292160L,
  )
}

///|
test "-2147483649 %u -9223372036854775808 = 9223372034707292159" {
  assert_eq(
    test_mod_u(-2147483649L, -9223372036854775808L),
    9223372034707292159L,
  )
}

///|
test "-2147483649 %u -9223372036854775808 = 9223372034707292159" {
  assert_eq(
    test_mod_u(-2147483649L, -9223372036854775808L),
    9223372034707292159L,
  )
}

///|
test "-2147483649 %u 9223372036854775807 = 9223372034707292160" {
  assert_eq(
    test_mod_u(-2147483649L, 9223372036854775807L),
    9223372034707292160L,
  )
}

///|
test "9223372036854775807 %u -1 = 9223372036854775807" {
  assert_eq(test_mod_u(9223372036854775807L, -1L), 9223372036854775807L)
}

///|
test "9223372036854775807 %u 1 = 0" {
  assert_eq(test_mod_u(9223372036854775807L, 1L), 0L)
}

///|
test "9223372036854775807 %u 2147483647 = 1" {
  assert_eq(test_mod_u(9223372036854775807L, 2147483647L), 1L)
}

///|
test "9223372036854775807 %u -2147483648 = 9223372036854775807" {
  assert_eq(
    test_mod_u(9223372036854775807L, -2147483648L),
    9223372036854775807L,
  )
}

///|
test "9223372036854775807 %u 2147483648 = 2147483647" {
  assert_eq(test_mod_u(9223372036854775807L, 2147483648L), 2147483647L)
}

///|
test "9223372036854775807 %u -2147483649 = 9223372036854775807" {
  assert_eq(
    test_mod_u(9223372036854775807L, -2147483649L),
    9223372036854775807L,
  )
}

///|
test "9223372036854775807 %u 9223372036854775807 = 0" {
  assert_eq(test_mod_u(9223372036854775807L, 9223372036854775807L), 0L)
}

///|
test "9223372036854775807 %u -9223372036854775808 = 9223372036854775807" {
  assert_eq(
    test_mod_u(9223372036854775807L, -9223372036854775808L),
    9223372036854775807L,
  )
}

///|
test "9223372036854775807 %u -9223372036854775808 = 9223372036854775807" {
  assert_eq(
    test_mod_u(9223372036854775807L, -9223372036854775808L),
    9223372036854775807L,
  )
}

///|
test "9223372036854775807 %u 9223372036854775807 = 0" {
  assert_eq(test_mod_u(9223372036854775807L, 9223372036854775807L), 0L)
}

///|
test "-9223372036854775808 %u 1 = 0" {
  assert_eq(test_mod_u(-9223372036854775808L, 1L), 0L)
}

///|
test "-9223372036854775808 %u 2147483647 = 2" {
  assert_eq(test_mod_u(-9223372036854775808L, 2147483647L), 2L)
}

///|
test "-9223372036854775808 %u -2147483648 = -9223372036854775808" {
  assert_eq(
    test_mod_u(-9223372036854775808L, -2147483648L),
    -9223372036854775808L,
  )
}

///|
test "-9223372036854775808 %u 2147483648 = 0" {
  assert_eq(test_mod_u(-9223372036854775808L, 2147483648L), 0L)
}

///|
test "-9223372036854775808 %u -2147483649 = -9223372036854775808" {
  assert_eq(
    test_mod_u(-9223372036854775808L, -2147483649L),
    -9223372036854775808L,
  )
}

///|
test "-9223372036854775808 %u 9223372036854775807 = 1" {
  assert_eq(test_mod_u(-9223372036854775808L, 9223372036854775807L), 1L)
}

///|
test "-9223372036854775808 %u -9223372036854775808 = 0" {
  assert_eq(test_mod_u(-9223372036854775808L, -9223372036854775808L), 0L)
}

///|
test "-9223372036854775808 %u -9223372036854775808 = 0" {
  assert_eq(test_mod_u(-9223372036854775808L, -9223372036854775808L), 0L)
}

///|
test "-9223372036854775808 %u 9223372036854775807 = 1" {
  assert_eq(test_mod_u(-9223372036854775808L, 9223372036854775807L), 1L)
}

///|
test "-9223372036854775808 %u 1 = 0" {
  assert_eq(test_mod_u(-9223372036854775808L, 1L), 0L)
}

///|
test "-9223372036854775808 %u 2147483647 = 2" {
  assert_eq(test_mod_u(-9223372036854775808L, 2147483647L), 2L)
}

///|
test "-9223372036854775808 %u -2147483648 = -9223372036854775808" {
  assert_eq(
    test_mod_u(-9223372036854775808L, -2147483648L),
    -9223372036854775808L,
  )
}

///|
test "-9223372036854775808 %u 2147483648 = 0" {
  assert_eq(test_mod_u(-9223372036854775808L, 2147483648L), 0L)
}

///|
test "-9223372036854775808 %u -2147483649 = -9223372036854775808" {
  assert_eq(
    test_mod_u(-9223372036854775808L, -2147483649L),
    -9223372036854775808L,
  )
}

///|
test "-9223372036854775808 %u 9223372036854775807 = 1" {
  assert_eq(test_mod_u(-9223372036854775808L, 9223372036854775807L), 1L)
}

///|
test "-9223372036854775808 %u -9223372036854775808 = 0" {
  assert_eq(test_mod_u(-9223372036854775808L, -9223372036854775808L), 0L)
}

///|
test "-9223372036854775808 %u -9223372036854775808 = 0" {
  assert_eq(test_mod_u(-9223372036854775808L, -9223372036854775808L), 0L)
}

///|
test "-9223372036854775808 %u 9223372036854775807 = 1" {
  assert_eq(test_mod_u(-9223372036854775808L, 9223372036854775807L), 1L)
}

///|
test "9223372036854775807 %u -1 = 9223372036854775807" {
  assert_eq(test_mod_u(9223372036854775807L, -1L), 9223372036854775807L)
}

///|
test "9223372036854775807 %u 1 = 0" {
  assert_eq(test_mod_u(9223372036854775807L, 1L), 0L)
}

///|
test "9223372036854775807 %u 2147483647 = 1" {
  assert_eq(test_mod_u(9223372036854775807L, 2147483647L), 1L)
}

///|
test "9223372036854775807 %u -2147483648 = 9223372036854775807" {
  assert_eq(
    test_mod_u(9223372036854775807L, -2147483648L),
    9223372036854775807L,
  )
}

///|
test "9223372036854775807 %u 2147483648 = 2147483647" {
  assert_eq(test_mod_u(9223372036854775807L, 2147483648L), 2147483647L)
}

///|
test "9223372036854775807 %u -2147483649 = 9223372036854775807" {
  assert_eq(
    test_mod_u(9223372036854775807L, -2147483649L),
    9223372036854775807L,
  )
}

///|
test "9223372036854775807 %u 9223372036854775807 = 0" {
  assert_eq(test_mod_u(9223372036854775807L, 9223372036854775807L), 0L)
}

///|
test "9223372036854775807 %u -9223372036854775808 = 9223372036854775807" {
  assert_eq(
    test_mod_u(9223372036854775807L, -9223372036854775808L),
    9223372036854775807L,
  )
}

///|
test "9223372036854775807 %u -9223372036854775808 = 9223372036854775807" {
  assert_eq(
    test_mod_u(9223372036854775807L, -9223372036854775808L),
    9223372036854775807L,
  )
}

///|
test "9223372036854775807 %u 9223372036854775807 = 0" {
  assert_eq(test_mod_u(9223372036854775807L, 9223372036854775807L), 0L)
}

///|
test "0 | 0 = 0" {
  assert_eq(0L | 0L, 0L)
}

///|
test "0 | -1 = -1" {
  assert_eq(0L | -1L, -1L)
}

///|
test "0 | 1 = 1" {
  assert_eq(0L | 1L, 1L)
}

///|
test "0 | 2147483647 = 2147483647" {
  assert_eq(0L | 2147483647L, 2147483647L)
}

///|
test "0 | -2147483648 = -2147483648" {
  assert_eq(0L | -2147483648L, -2147483648L)
}

///|
test "0 | 2147483648 = 2147483648" {
  assert_eq(0L | 2147483648L, 2147483648L)
}

///|
test "0 | -2147483649 = -2147483649" {
  assert_eq(0L | -2147483649L, -2147483649L)
}

///|
test "0 | 9223372036854775807 = 9223372036854775807" {
  assert_eq(0L | 9223372036854775807L, 9223372036854775807L)
}

///|
test "0 | -9223372036854775808 = -9223372036854775808" {
  assert_eq(0L | -9223372036854775808L, -9223372036854775808L)
}

///|
test "0 | -9223372036854775808 = -9223372036854775808" {
  assert_eq(0L | -9223372036854775808L, -9223372036854775808L)
}

///|
test "0 | 9223372036854775807 = 9223372036854775807" {
  assert_eq(0L | 9223372036854775807L, 9223372036854775807L)
}

///|
test "-1 | 0 = -1" {
  assert_eq(-1L | 0L, -1L)
}

///|
test "-1 | -1 = -1" {
  assert_eq(-1L | -1L, -1L)
}

///|
test "-1 | 1 = -1" {
  assert_eq(-1L | 1L, -1L)
}

///|
test "-1 | 2147483647 = -1" {
  assert_eq(-1L | 2147483647L, -1L)
}

///|
test "-1 | -2147483648 = -1" {
  assert_eq(-1L | -2147483648L, -1L)
}

///|
test "-1 | 2147483648 = -1" {
  assert_eq(-1L | 2147483648L, -1L)
}

///|
test "-1 | -2147483649 = -1" {
  assert_eq(-1L | -2147483649L, -1L)
}

///|
test "-1 | 9223372036854775807 = -1" {
  assert_eq(-1L | 9223372036854775807L, -1L)
}

///|
test "-1 | -9223372036854775808 = -1" {
  assert_eq(-1L | -9223372036854775808L, -1L)
}

///|
test "-1 | -9223372036854775808 = -1" {
  assert_eq(-1L | -9223372036854775808L, -1L)
}

///|
test "-1 | 9223372036854775807 = -1" {
  assert_eq(-1L | 9223372036854775807L, -1L)
}

///|
test "1 | 0 = 1" {
  assert_eq(1L | 0L, 1L)
}

///|
test "1 | -1 = -1" {
  assert_eq(1L | -1L, -1L)
}

///|
test "1 | 1 = 1" {
  assert_eq(1L | 1L, 1L)
}

///|
test "1 | 2147483647 = 2147483647" {
  assert_eq(1L | 2147483647L, 2147483647L)
}

///|
test "1 | -2147483648 = -2147483647" {
  assert_eq(1L | -2147483648L, -2147483647L)
}

///|
test "1 | 2147483648 = 2147483649" {
  assert_eq(1L | 2147483648L, 2147483649L)
}

///|
test "1 | -2147483649 = -2147483649" {
  assert_eq(1L | -2147483649L, -2147483649L)
}

///|
test "1 | 9223372036854775807 = 9223372036854775807" {
  assert_eq(1L | 9223372036854775807L, 9223372036854775807L)
}

///|
test "1 | -9223372036854775808 = -9223372036854775807" {
  assert_eq(1L | -9223372036854775808L, -9223372036854775807L)
}

///|
test "1 | -9223372036854775808 = -9223372036854775807" {
  assert_eq(1L | -9223372036854775808L, -9223372036854775807L)
}

///|
test "1 | 9223372036854775807 = 9223372036854775807" {
  assert_eq(1L | 9223372036854775807L, 9223372036854775807L)
}

///|
test "2147483647 | 0 = 2147483647" {
  assert_eq(2147483647L | 0L, 2147483647L)
}

///|
test "2147483647 | -1 = -1" {
  assert_eq(2147483647L | -1L, -1L)
}

///|
test "2147483647 | 1 = 2147483647" {
  assert_eq(2147483647L | 1L, 2147483647L)
}

///|
test "2147483647 | 2147483647 = 2147483647" {
  assert_eq(2147483647L | 2147483647L, 2147483647L)
}

///|
test "2147483647 | -2147483648 = -1" {
  assert_eq(2147483647L | -2147483648L, -1L)
}

///|
test "2147483647 | 2147483648 = 4294967295" {
  assert_eq(2147483647L | 2147483648L, 4294967295L)
}

///|
test "2147483647 | -2147483649 = -2147483649" {
  assert_eq(2147483647L | -2147483649L, -2147483649L)
}

///|
test "2147483647 | 9223372036854775807 = 9223372036854775807" {
  assert_eq(2147483647L | 9223372036854775807L, 9223372036854775807L)
}

///|
test "2147483647 | -9223372036854775808 = -9223372034707292161" {
  assert_eq(2147483647L | -9223372036854775808L, -9223372034707292161L)
}

///|
test "2147483647 | -9223372036854775808 = -9223372034707292161" {
  assert_eq(2147483647L | -9223372036854775808L, -9223372034707292161L)
}

///|
test "2147483647 | 9223372036854775807 = 9223372036854775807" {
  assert_eq(2147483647L | 9223372036854775807L, 9223372036854775807L)
}

///|
test "-2147483648 | 0 = -2147483648" {
  assert_eq(-2147483648L | 0L, -2147483648L)
}

///|
test "-2147483648 | -1 = -1" {
  assert_eq(-2147483648L | -1L, -1L)
}

///|
test "-2147483648 | 1 = -2147483647" {
  assert_eq(-2147483648L | 1L, -2147483647L)
}

///|
test "-2147483648 | 2147483647 = -1" {
  assert_eq(-2147483648L | 2147483647L, -1L)
}

///|
test "-2147483648 | -2147483648 = -2147483648" {
  assert_eq(-2147483648L | -2147483648L, -2147483648L)
}

///|
test "-2147483648 | 2147483648 = -2147483648" {
  assert_eq(-2147483648L | 2147483648L, -2147483648L)
}

///|
test "-2147483648 | -2147483649 = -1" {
  assert_eq(-2147483648L | -2147483649L, -1L)
}

///|
test "-2147483648 | 9223372036854775807 = -1" {
  assert_eq(-2147483648L | 9223372036854775807L, -1L)
}

///|
test "-2147483648 | -9223372036854775808 = -2147483648" {
  assert_eq(-2147483648L | -9223372036854775808L, -2147483648L)
}

///|
test "-2147483648 | -9223372036854775808 = -2147483648" {
  assert_eq(-2147483648L | -9223372036854775808L, -2147483648L)
}

///|
test "-2147483648 | 9223372036854775807 = -1" {
  assert_eq(-2147483648L | 9223372036854775807L, -1L)
}

///|
test "2147483648 | 0 = 2147483648" {
  assert_eq(2147483648L | 0L, 2147483648L)
}

///|
test "2147483648 | -1 = -1" {
  assert_eq(2147483648L | -1L, -1L)
}

///|
test "2147483648 | 1 = 2147483649" {
  assert_eq(2147483648L | 1L, 2147483649L)
}

///|
test "2147483648 | 2147483647 = 4294967295" {
  assert_eq(2147483648L | 2147483647L, 4294967295L)
}

///|
test "2147483648 | -2147483648 = -2147483648" {
  assert_eq(2147483648L | -2147483648L, -2147483648L)
}

///|
test "2147483648 | 2147483648 = 2147483648" {
  assert_eq(2147483648L | 2147483648L, 2147483648L)
}

///|
test "2147483648 | -2147483649 = -1" {
  assert_eq(2147483648L | -2147483649L, -1L)
}

///|
test "2147483648 | 9223372036854775807 = 9223372036854775807" {
  assert_eq(2147483648L | 9223372036854775807L, 9223372036854775807L)
}

///|
test "2147483648 | -9223372036854775808 = -9223372034707292160" {
  assert_eq(2147483648L | -9223372036854775808L, -9223372034707292160L)
}

///|
test "2147483648 | -9223372036854775808 = -9223372034707292160" {
  assert_eq(2147483648L | -9223372036854775808L, -9223372034707292160L)
}

///|
test "2147483648 | 9223372036854775807 = 9223372036854775807" {
  assert_eq(2147483648L | 9223372036854775807L, 9223372036854775807L)
}

///|
test "-2147483649 | 0 = -2147483649" {
  assert_eq(-2147483649L | 0L, -2147483649L)
}

///|
test "-2147483649 | -1 = -1" {
  assert_eq(-2147483649L | -1L, -1L)
}

///|
test "-2147483649 | 1 = -2147483649" {
  assert_eq(-2147483649L | 1L, -2147483649L)
}

///|
test "-2147483649 | 2147483647 = -2147483649" {
  assert_eq(-2147483649L | 2147483647L, -2147483649L)
}

///|
test "-2147483649 | -2147483648 = -1" {
  assert_eq(-2147483649L | -2147483648L, -1L)
}

///|
test "-2147483649 | 2147483648 = -1" {
  assert_eq(-2147483649L | 2147483648L, -1L)
}

///|
test "-2147483649 | -2147483649 = -2147483649" {
  assert_eq(-2147483649L | -2147483649L, -2147483649L)
}

///|
test "-2147483649 | 9223372036854775807 = -1" {
  assert_eq(-2147483649L | 9223372036854775807L, -1L)
}

///|
test "-2147483649 | -9223372036854775808 = -2147483649" {
  assert_eq(-2147483649L | -9223372036854775808L, -2147483649L)
}

///|
test "-2147483649 | -9223372036854775808 = -2147483649" {
  assert_eq(-2147483649L | -9223372036854775808L, -2147483649L)
}

///|
test "-2147483649 | 9223372036854775807 = -1" {
  assert_eq(-2147483649L | 9223372036854775807L, -1L)
}

///|
test "9223372036854775807 | 0 = 9223372036854775807" {
  assert_eq(9223372036854775807L | 0L, 9223372036854775807L)
}

///|
test "9223372036854775807 | -1 = -1" {
  assert_eq(9223372036854775807L | -1L, -1L)
}

///|
test "9223372036854775807 | 1 = 9223372036854775807" {
  assert_eq(9223372036854775807L | 1L, 9223372036854775807L)
}

///|
test "9223372036854775807 | 2147483647 = 9223372036854775807" {
  assert_eq(9223372036854775807L | 2147483647L, 9223372036854775807L)
}

///|
test "9223372036854775807 | -2147483648 = -1" {
  assert_eq(9223372036854775807L | -2147483648L, -1L)
}

///|
test "9223372036854775807 | 2147483648 = 9223372036854775807" {
  assert_eq(9223372036854775807L | 2147483648L, 9223372036854775807L)
}

///|
test "9223372036854775807 | -2147483649 = -1" {
  assert_eq(9223372036854775807L | -2147483649L, -1L)
}

///|
test "9223372036854775807 | 9223372036854775807 = 9223372036854775807" {
  assert_eq(9223372036854775807L | 9223372036854775807L, 9223372036854775807L)
}

///|
test "9223372036854775807 | -9223372036854775808 = -1" {
  assert_eq(9223372036854775807L | -9223372036854775808L, -1L)
}

///|
test "9223372036854775807 | -9223372036854775808 = -1" {
  assert_eq(9223372036854775807L | -9223372036854775808L, -1L)
}

///|
test "9223372036854775807 | 9223372036854775807 = 9223372036854775807" {
  assert_eq(9223372036854775807L | 9223372036854775807L, 9223372036854775807L)
}

///|
test "-9223372036854775808 | 0 = -9223372036854775808" {
  assert_eq(-9223372036854775808L | 0L, -9223372036854775808L)
}

///|
test "-9223372036854775808 | -1 = -1" {
  assert_eq(-9223372036854775808L | -1L, -1L)
}

///|
test "-9223372036854775808 | 1 = -9223372036854775807" {
  assert_eq(-9223372036854775808L | 1L, -9223372036854775807L)
}

///|
test "-9223372036854775808 | 2147483647 = -9223372034707292161" {
  assert_eq(-9223372036854775808L | 2147483647L, -9223372034707292161L)
}

///|
test "-9223372036854775808 | -2147483648 = -2147483648" {
  assert_eq(-9223372036854775808L | -2147483648L, -2147483648L)
}

///|
test "-9223372036854775808 | 2147483648 = -9223372034707292160" {
  assert_eq(-9223372036854775808L | 2147483648L, -9223372034707292160L)
}

///|
test "-9223372036854775808 | -2147483649 = -2147483649" {
  assert_eq(-9223372036854775808L | -2147483649L, -2147483649L)
}

///|
test "-9223372036854775808 | 9223372036854775807 = -1" {
  assert_eq(-9223372036854775808L | 9223372036854775807L, -1L)
}

///|
test "-9223372036854775808 | -9223372036854775808 = -9223372036854775808" {
  assert_eq(
    -9223372036854775808L | -9223372036854775808L,
    -9223372036854775808L,
  )
}

///|
test "-9223372036854775808 | -9223372036854775808 = -9223372036854775808" {
  assert_eq(
    -9223372036854775808L | -9223372036854775808L,
    -9223372036854775808L,
  )
}

///|
test "-9223372036854775808 | 9223372036854775807 = -1" {
  assert_eq(-9223372036854775808L | 9223372036854775807L, -1L)
}

///|
test "-9223372036854775808 | 0 = -9223372036854775808" {
  assert_eq(-9223372036854775808L | 0L, -9223372036854775808L)
}

///|
test "-9223372036854775808 | -1 = -1" {
  assert_eq(-9223372036854775808L | -1L, -1L)
}

///|
test "-9223372036854775808 | 1 = -9223372036854775807" {
  assert_eq(-9223372036854775808L | 1L, -9223372036854775807L)
}

///|
test "-9223372036854775808 | 2147483647 = -9223372034707292161" {
  assert_eq(-9223372036854775808L | 2147483647L, -9223372034707292161L)
}

///|
test "-9223372036854775808 | -2147483648 = -2147483648" {
  assert_eq(-9223372036854775808L | -2147483648L, -2147483648L)
}

///|
test "-9223372036854775808 | 2147483648 = -9223372034707292160" {
  assert_eq(-9223372036854775808L | 2147483648L, -9223372034707292160L)
}

///|
test "-9223372036854775808 | -2147483649 = -2147483649" {
  assert_eq(-9223372036854775808L | -2147483649L, -2147483649L)
}

///|
test "-9223372036854775808 | 9223372036854775807 = -1" {
  assert_eq(-9223372036854775808L | 9223372036854775807L, -1L)
}

///|
test "-9223372036854775808 | -9223372036854775808 = -9223372036854775808" {
  assert_eq(
    -9223372036854775808L | -9223372036854775808L,
    -9223372036854775808L,
  )
}

///|
test "-9223372036854775808 | -9223372036854775808 = -9223372036854775808" {
  assert_eq(
    -9223372036854775808L | -9223372036854775808L,
    -9223372036854775808L,
  )
}

///|
test "-9223372036854775808 | 9223372036854775807 = -1" {
  assert_eq(-9223372036854775808L | 9223372036854775807L, -1L)
}

///|
test "9223372036854775807 | 0 = 9223372036854775807" {
  assert_eq(9223372036854775807L | 0L, 9223372036854775807L)
}

///|
test "9223372036854775807 | -1 = -1" {
  assert_eq(9223372036854775807L | -1L, -1L)
}

///|
test "9223372036854775807 | 1 = 9223372036854775807" {
  assert_eq(9223372036854775807L | 1L, 9223372036854775807L)
}

///|
test "9223372036854775807 | 2147483647 = 9223372036854775807" {
  assert_eq(9223372036854775807L | 2147483647L, 9223372036854775807L)
}

///|
test "9223372036854775807 | -2147483648 = -1" {
  assert_eq(9223372036854775807L | -2147483648L, -1L)
}

///|
test "9223372036854775807 | 2147483648 = 9223372036854775807" {
  assert_eq(9223372036854775807L | 2147483648L, 9223372036854775807L)
}

///|
test "9223372036854775807 | -2147483649 = -1" {
  assert_eq(9223372036854775807L | -2147483649L, -1L)
}

///|
test "9223372036854775807 | 9223372036854775807 = 9223372036854775807" {
  assert_eq(9223372036854775807L | 9223372036854775807L, 9223372036854775807L)
}

///|
test "9223372036854775807 | -9223372036854775808 = -1" {
  assert_eq(9223372036854775807L | -9223372036854775808L, -1L)
}

///|
test "9223372036854775807 | -9223372036854775808 = -1" {
  assert_eq(9223372036854775807L | -9223372036854775808L, -1L)
}

///|
test "9223372036854775807 | 9223372036854775807 = 9223372036854775807" {
  assert_eq(9223372036854775807L | 9223372036854775807L, 9223372036854775807L)
}

///|
test "0 ^ 0 = 0" {
  assert_eq(0L ^ 0L, 0L)
}

///|
test "0 ^ -1 = -1" {
  assert_eq(0L ^ -1L, -1L)
}

///|
test "0 ^ 1 = 1" {
  assert_eq(0L ^ 1L, 1L)
}

///|
test "0 ^ 2147483647 = 2147483647" {
  assert_eq(0L ^ 2147483647L, 2147483647L)
}

///|
test "0 ^ -2147483648 = -2147483648" {
  assert_eq(0L ^ -2147483648L, -2147483648L)
}

///|
test "0 ^ 2147483648 = 2147483648" {
  assert_eq(0L ^ 2147483648L, 2147483648L)
}

///|
test "0 ^ -2147483649 = -2147483649" {
  assert_eq(0L ^ -2147483649L, -2147483649L)
}

///|
test "0 ^ 9223372036854775807 = 9223372036854775807" {
  assert_eq(0L ^ 9223372036854775807L, 9223372036854775807L)
}

///|
test "0 ^ -9223372036854775808 = -9223372036854775808" {
  assert_eq(0L ^ -9223372036854775808L, -9223372036854775808L)
}

///|
test "0 ^ -9223372036854775808 = -9223372036854775808" {
  assert_eq(0L ^ -9223372036854775808L, -9223372036854775808L)
}

///|
test "0 ^ 9223372036854775807 = 9223372036854775807" {
  assert_eq(0L ^ 9223372036854775807L, 9223372036854775807L)
}

///|
test "-1 ^ 0 = -1" {
  assert_eq(-1L ^ 0L, -1L)
}

///|
test "-1 ^ -1 = 0" {
  assert_eq(-1L ^ -1L, 0L)
}

///|
test "-1 ^ 1 = -2" {
  assert_eq(-1L ^ 1L, -2L)
}

///|
test "-1 ^ 2147483647 = -2147483648" {
  assert_eq(-1L ^ 2147483647L, -2147483648L)
}

///|
test "-1 ^ -2147483648 = 2147483647" {
  assert_eq(-1L ^ -2147483648L, 2147483647L)
}

///|
test "-1 ^ 2147483648 = -2147483649" {
  assert_eq(-1L ^ 2147483648L, -2147483649L)
}

///|
test "-1 ^ -2147483649 = 2147483648" {
  assert_eq(-1L ^ -2147483649L, 2147483648L)
}

///|
test "-1 ^ 9223372036854775807 = -9223372036854775808" {
  assert_eq(-1L ^ 9223372036854775807L, -9223372036854775808L)
}

///|
test "-1 ^ -9223372036854775808 = 9223372036854775807" {
  assert_eq(-1L ^ -9223372036854775808L, 9223372036854775807L)
}

///|
test "-1 ^ -9223372036854775808 = 9223372036854775807" {
  assert_eq(-1L ^ -9223372036854775808L, 9223372036854775807L)
}

///|
test "-1 ^ 9223372036854775807 = -9223372036854775808" {
  assert_eq(-1L ^ 9223372036854775807L, -9223372036854775808L)
}

///|
test "1 ^ 0 = 1" {
  assert_eq(1L ^ 0L, 1L)
}

///|
test "1 ^ -1 = -2" {
  assert_eq(1L ^ -1L, -2L)
}

///|
test "1 ^ 1 = 0" {
  assert_eq(1L ^ 1L, 0L)
}

///|
test "1 ^ 2147483647 = 2147483646" {
  assert_eq(1L ^ 2147483647L, 2147483646L)
}

///|
test "1 ^ -2147483648 = -2147483647" {
  assert_eq(1L ^ -2147483648L, -2147483647L)
}

///|
test "1 ^ 2147483648 = 2147483649" {
  assert_eq(1L ^ 2147483648L, 2147483649L)
}

///|
test "1 ^ -2147483649 = -2147483650" {
  assert_eq(1L ^ -2147483649L, -2147483650L)
}

///|
test "1 ^ 9223372036854775807 = 9223372036854775806" {
  assert_eq(1L ^ 9223372036854775807L, 9223372036854775806L)
}

///|
test "1 ^ -9223372036854775808 = -9223372036854775807" {
  assert_eq(1L ^ -9223372036854775808L, -9223372036854775807L)
}

///|
test "1 ^ -9223372036854775808 = -9223372036854775807" {
  assert_eq(1L ^ -9223372036854775808L, -9223372036854775807L)
}

///|
test "1 ^ 9223372036854775807 = 9223372036854775806" {
  assert_eq(1L ^ 9223372036854775807L, 9223372036854775806L)
}

///|
test "2147483647 ^ 0 = 2147483647" {
  assert_eq(2147483647L ^ 0L, 2147483647L)
}

///|
test "2147483647 ^ -1 = -2147483648" {
  assert_eq(2147483647L ^ -1L, -2147483648L)
}

///|
test "2147483647 ^ 1 = 2147483646" {
  assert_eq(2147483647L ^ 1L, 2147483646L)
}

///|
test "2147483647 ^ 2147483647 = 0" {
  assert_eq(2147483647L ^ 2147483647L, 0L)
}

///|
test "2147483647 ^ -2147483648 = -1" {
  assert_eq(2147483647L ^ -2147483648L, -1L)
}

///|
test "2147483647 ^ 2147483648 = 4294967295" {
  assert_eq(2147483647L ^ 2147483648L, 4294967295L)
}

///|
test "2147483647 ^ -2147483649 = -4294967296" {
  assert_eq(2147483647L ^ -2147483649L, -4294967296L)
}

///|
test "2147483647 ^ 9223372036854775807 = 9223372034707292160" {
  assert_eq(2147483647L ^ 9223372036854775807L, 9223372034707292160L)
}

///|
test "2147483647 ^ -9223372036854775808 = -9223372034707292161" {
  assert_eq(2147483647L ^ -9223372036854775808L, -9223372034707292161L)
}

///|
test "2147483647 ^ -9223372036854775808 = -9223372034707292161" {
  assert_eq(2147483647L ^ -9223372036854775808L, -9223372034707292161L)
}

///|
test "2147483647 ^ 9223372036854775807 = 9223372034707292160" {
  assert_eq(2147483647L ^ 9223372036854775807L, 9223372034707292160L)
}

///|
test "-2147483648 ^ 0 = -2147483648" {
  assert_eq(-2147483648L ^ 0L, -2147483648L)
}

///|
test "-2147483648 ^ -1 = 2147483647" {
  assert_eq(-2147483648L ^ -1L, 2147483647L)
}

///|
test "-2147483648 ^ 1 = -2147483647" {
  assert_eq(-2147483648L ^ 1L, -2147483647L)
}

///|
test "-2147483648 ^ 2147483647 = -1" {
  assert_eq(-2147483648L ^ 2147483647L, -1L)
}

///|
test "-2147483648 ^ -2147483648 = 0" {
  assert_eq(-2147483648L ^ -2147483648L, 0L)
}

///|
test "-2147483648 ^ 2147483648 = -4294967296" {
  assert_eq(-2147483648L ^ 2147483648L, -4294967296L)
}

///|
test "-2147483648 ^ -2147483649 = 4294967295" {
  assert_eq(-2147483648L ^ -2147483649L, 4294967295L)
}

///|
test "-2147483648 ^ 9223372036854775807 = -9223372034707292161" {
  assert_eq(-2147483648L ^ 9223372036854775807L, -9223372034707292161L)
}

///|
test "-2147483648 ^ -9223372036854775808 = 9223372034707292160" {
  assert_eq(-2147483648L ^ -9223372036854775808L, 9223372034707292160L)
}

///|
test "-2147483648 ^ -9223372036854775808 = 9223372034707292160" {
  assert_eq(-2147483648L ^ -9223372036854775808L, 9223372034707292160L)
}

///|
test "-2147483648 ^ 9223372036854775807 = -9223372034707292161" {
  assert_eq(-2147483648L ^ 9223372036854775807L, -9223372034707292161L)
}

///|
test "2147483648 ^ 0 = 2147483648" {
  assert_eq(2147483648L ^ 0L, 2147483648L)
}

///|
test "2147483648 ^ -1 = -2147483649" {
  assert_eq(2147483648L ^ -1L, -2147483649L)
}

///|
test "2147483648 ^ 1 = 2147483649" {
  assert_eq(2147483648L ^ 1L, 2147483649L)
}

///|
test "2147483648 ^ 2147483647 = 4294967295" {
  assert_eq(2147483648L ^ 2147483647L, 4294967295L)
}

///|
test "2147483648 ^ -2147483648 = -4294967296" {
  assert_eq(2147483648L ^ -2147483648L, -4294967296L)
}

///|
test "2147483648 ^ 2147483648 = 0" {
  assert_eq(2147483648L ^ 2147483648L, 0L)
}

///|
test "2147483648 ^ -2147483649 = -1" {
  assert_eq(2147483648L ^ -2147483649L, -1L)
}

///|
test "2147483648 ^ 9223372036854775807 = 9223372034707292159" {
  assert_eq(2147483648L ^ 9223372036854775807L, 9223372034707292159L)
}

///|
test "2147483648 ^ -9223372036854775808 = -9223372034707292160" {
  assert_eq(2147483648L ^ -9223372036854775808L, -9223372034707292160L)
}

///|
test "2147483648 ^ -9223372036854775808 = -9223372034707292160" {
  assert_eq(2147483648L ^ -9223372036854775808L, -9223372034707292160L)
}

///|
test "2147483648 ^ 9223372036854775807 = 9223372034707292159" {
  assert_eq(2147483648L ^ 9223372036854775807L, 9223372034707292159L)
}

///|
test "-2147483649 ^ 0 = -2147483649" {
  assert_eq(-2147483649L ^ 0L, -2147483649L)
}

///|
test "-2147483649 ^ -1 = 2147483648" {
  assert_eq(-2147483649L ^ -1L, 2147483648L)
}

///|
test "-2147483649 ^ 1 = -2147483650" {
  assert_eq(-2147483649L ^ 1L, -2147483650L)
}

///|
test "-2147483649 ^ 2147483647 = -4294967296" {
  assert_eq(-2147483649L ^ 2147483647L, -4294967296L)
}

///|
test "-2147483649 ^ -2147483648 = 4294967295" {
  assert_eq(-2147483649L ^ -2147483648L, 4294967295L)
}

///|
test "-2147483649 ^ 2147483648 = -1" {
  assert_eq(-2147483649L ^ 2147483648L, -1L)
}

///|
test "-2147483649 ^ -2147483649 = 0" {
  assert_eq(-2147483649L ^ -2147483649L, 0L)
}

///|
test "-2147483649 ^ 9223372036854775807 = -9223372034707292160" {
  assert_eq(-2147483649L ^ 9223372036854775807L, -9223372034707292160L)
}

///|
test "-2147483649 ^ -9223372036854775808 = 9223372034707292159" {
  assert_eq(-2147483649L ^ -9223372036854775808L, 9223372034707292159L)
}

///|
test "-2147483649 ^ -9223372036854775808 = 9223372034707292159" {
  assert_eq(-2147483649L ^ -9223372036854775808L, 9223372034707292159L)
}

///|
test "-2147483649 ^ 9223372036854775807 = -9223372034707292160" {
  assert_eq(-2147483649L ^ 9223372036854775807L, -9223372034707292160L)
}

///|
test "9223372036854775807 ^ 0 = 9223372036854775807" {
  assert_eq(9223372036854775807L ^ 0L, 9223372036854775807L)
}

///|
test "9223372036854775807 ^ -1 = -9223372036854775808" {
  assert_eq(9223372036854775807L ^ -1L, -9223372036854775808L)
}

///|
test "9223372036854775807 ^ 1 = 9223372036854775806" {
  assert_eq(9223372036854775807L ^ 1L, 9223372036854775806L)
}

///|
test "9223372036854775807 ^ 2147483647 = 9223372034707292160" {
  assert_eq(9223372036854775807L ^ 2147483647L, 9223372034707292160L)
}

///|
test "9223372036854775807 ^ -2147483648 = -9223372034707292161" {
  assert_eq(9223372036854775807L ^ -2147483648L, -9223372034707292161L)
}

///|
test "9223372036854775807 ^ 2147483648 = 9223372034707292159" {
  assert_eq(9223372036854775807L ^ 2147483648L, 9223372034707292159L)
}

///|
test "9223372036854775807 ^ -2147483649 = -9223372034707292160" {
  assert_eq(9223372036854775807L ^ -2147483649L, -9223372034707292160L)
}

///|
test "9223372036854775807 ^ 9223372036854775807 = 0" {
  assert_eq(9223372036854775807L ^ 9223372036854775807L, 0L)
}

///|
test "9223372036854775807 ^ -9223372036854775808 = -1" {
  assert_eq(9223372036854775807L ^ -9223372036854775808L, -1L)
}

///|
test "9223372036854775807 ^ -9223372036854775808 = -1" {
  assert_eq(9223372036854775807L ^ -9223372036854775808L, -1L)
}

///|
test "9223372036854775807 ^ 9223372036854775807 = 0" {
  assert_eq(9223372036854775807L ^ 9223372036854775807L, 0L)
}

///|
test "-9223372036854775808 ^ 0 = -9223372036854775808" {
  assert_eq(-9223372036854775808L ^ 0L, -9223372036854775808L)
}

///|
test "-9223372036854775808 ^ -1 = 9223372036854775807" {
  assert_eq(-9223372036854775808L ^ -1L, 9223372036854775807L)
}

///|
test "-9223372036854775808 ^ 1 = -9223372036854775807" {
  assert_eq(-9223372036854775808L ^ 1L, -9223372036854775807L)
}

///|
test "-9223372036854775808 ^ 2147483647 = -9223372034707292161" {
  assert_eq(-9223372036854775808L ^ 2147483647L, -9223372034707292161L)
}

///|
test "-9223372036854775808 ^ -2147483648 = 9223372034707292160" {
  assert_eq(-9223372036854775808L ^ -2147483648L, 9223372034707292160L)
}

///|
test "-9223372036854775808 ^ 2147483648 = -9223372034707292160" {
  assert_eq(-9223372036854775808L ^ 2147483648L, -9223372034707292160L)
}

///|
test "-9223372036854775808 ^ -2147483649 = 9223372034707292159" {
  assert_eq(-9223372036854775808L ^ -2147483649L, 9223372034707292159L)
}

///|
test "-9223372036854775808 ^ 9223372036854775807 = -1" {
  assert_eq(-9223372036854775808L ^ 9223372036854775807L, -1L)
}

///|
test "-9223372036854775808 ^ -9223372036854775808 = 0" {
  assert_eq(-9223372036854775808L ^ -9223372036854775808L, 0L)
}

///|
test "-9223372036854775808 ^ -9223372036854775808 = 0" {
  assert_eq(-9223372036854775808L ^ -9223372036854775808L, 0L)
}

///|
test "-9223372036854775808 ^ 9223372036854775807 = -1" {
  assert_eq(-9223372036854775808L ^ 9223372036854775807L, -1L)
}

///|
test "-9223372036854775808 ^ 0 = -9223372036854775808" {
  assert_eq(-9223372036854775808L ^ 0L, -9223372036854775808L)
}

///|
test "-9223372036854775808 ^ -1 = 9223372036854775807" {
  assert_eq(-9223372036854775808L ^ -1L, 9223372036854775807L)
}

///|
test "-9223372036854775808 ^ 1 = -9223372036854775807" {
  assert_eq(-9223372036854775808L ^ 1L, -9223372036854775807L)
}

///|
test "-9223372036854775808 ^ 2147483647 = -9223372034707292161" {
  assert_eq(-9223372036854775808L ^ 2147483647L, -9223372034707292161L)
}

///|
test "-9223372036854775808 ^ -2147483648 = 9223372034707292160" {
  assert_eq(-9223372036854775808L ^ -2147483648L, 9223372034707292160L)
}

///|
test "-9223372036854775808 ^ 2147483648 = -9223372034707292160" {
  assert_eq(-9223372036854775808L ^ 2147483648L, -9223372034707292160L)
}

///|
test "-9223372036854775808 ^ -2147483649 = 9223372034707292159" {
  assert_eq(-9223372036854775808L ^ -2147483649L, 9223372034707292159L)
}

///|
test "-9223372036854775808 ^ 9223372036854775807 = -1" {
  assert_eq(-9223372036854775808L ^ 9223372036854775807L, -1L)
}

///|
test "-9223372036854775808 ^ -9223372036854775808 = 0" {
  assert_eq(-9223372036854775808L ^ -9223372036854775808L, 0L)
}

///|
test "-9223372036854775808 ^ -9223372036854775808 = 0" {
  assert_eq(-9223372036854775808L ^ -9223372036854775808L, 0L)
}

///|
test "-9223372036854775808 ^ 9223372036854775807 = -1" {
  assert_eq(-9223372036854775808L ^ 9223372036854775807L, -1L)
}

///|
test "9223372036854775807 ^ 0 = 9223372036854775807" {
  assert_eq(9223372036854775807L ^ 0L, 9223372036854775807L)
}

///|
test "9223372036854775807 ^ -1 = -9223372036854775808" {
  assert_eq(9223372036854775807L ^ -1L, -9223372036854775808L)
}

///|
test "9223372036854775807 ^ 1 = 9223372036854775806" {
  assert_eq(9223372036854775807L ^ 1L, 9223372036854775806L)
}

///|
test "9223372036854775807 ^ 2147483647 = 9223372034707292160" {
  assert_eq(9223372036854775807L ^ 2147483647L, 9223372034707292160L)
}

///|
test "9223372036854775807 ^ -2147483648 = -9223372034707292161" {
  assert_eq(9223372036854775807L ^ -2147483648L, -9223372034707292161L)
}

///|
test "9223372036854775807 ^ 2147483648 = 9223372034707292159" {
  assert_eq(9223372036854775807L ^ 2147483648L, 9223372034707292159L)
}

///|
test "9223372036854775807 ^ -2147483649 = -9223372034707292160" {
  assert_eq(9223372036854775807L ^ -2147483649L, -9223372034707292160L)
}

///|
test "9223372036854775807 ^ 9223372036854775807 = 0" {
  assert_eq(9223372036854775807L ^ 9223372036854775807L, 0L)
}

///|
test "9223372036854775807 ^ -9223372036854775808 = -1" {
  assert_eq(9223372036854775807L ^ -9223372036854775808L, -1L)
}

///|
test "9223372036854775807 ^ -9223372036854775808 = -1" {
  assert_eq(9223372036854775807L ^ -9223372036854775808L, -1L)
}

///|
test "9223372036854775807 ^ 9223372036854775807 = 0" {
  assert_eq(9223372036854775807L ^ 9223372036854775807L, 0L)
}

///|
test "0 << 0 = 0" {
  assert_eq(0L << 0, 0L)
}

///|
test "0 << 1 = 0" {
  assert_eq(0L << 1, 0L)
}

///|
test "0 << 31 = 0" {
  assert_eq(0L << 31, 0L)
}

///|
test "0 << 32 = 0" {
  assert_eq(0L << 32, 0L)
}

///|
test "0 << 33 = 0" {
  assert_eq(0L << 33, 0L)
}

///|
test "0 << 63 = 0" {
  assert_eq(0L << 63, 0L)
}

///|
test "0 << 64 = 0" {
  assert_eq(0L << 64, 0L)
}

///|
test "0 << 65 = 0" {
  assert_eq(0L << 65, 0L)
}

///|
test "-1 << 0 = -1" {
  assert_eq(-1L << 0, -1L)
}

///|
test "-1 << 1 = -2" {
  assert_eq(-1L << 1, -2L)
}

///|
test "-1 << 31 = -2147483648" {
  assert_eq(-1L << 31, -2147483648L)
}

///|
test "-1 << 32 = -4294967296" {
  assert_eq(-1L << 32, -4294967296L)
}

///|
test "-1 << 33 = -8589934592" {
  assert_eq(-1L << 33, -8589934592L)
}

///|
test "-1 << 63 = -9223372036854775808" {
  assert_eq(-1L << 63, -9223372036854775808L)
}

///|
test "-1 << 64 = -1" {
  assert_eq(-1L << 64, -1L)
}

///|
test "-1 << 65 = -2" {
  assert_eq(-1L << 65, -2L)
}

///|
test "1 << 0 = 1" {
  assert_eq(1L << 0, 1L)
}

///|
test "1 << 1 = 2" {
  assert_eq(1L << 1, 2L)
}

///|
test "1 << 31 = 2147483648" {
  assert_eq(1L << 31, 2147483648L)
}

///|
test "1 << 32 = 4294967296" {
  assert_eq(1L << 32, 4294967296L)
}

///|
test "1 << 33 = 8589934592" {
  assert_eq(1L << 33, 8589934592L)
}

///|
test "1 << 63 = -9223372036854775808" {
  assert_eq(1L << 63, -9223372036854775808L)
}

///|
test "1 << 64 = 1" {
  assert_eq(1L << 64, 1L)
}

///|
test "1 << 65 = 2" {
  assert_eq(1L << 65, 2L)
}

///|
test "2147483647 << 0 = 2147483647" {
  assert_eq(2147483647L << 0, 2147483647L)
}

///|
test "2147483647 << 1 = 4294967294" {
  assert_eq(2147483647L << 1, 4294967294L)
}

///|
test "2147483647 << 31 = 4611686016279904256" {
  assert_eq(2147483647L << 31, 4611686016279904256L)
}

///|
test "2147483647 << 32 = 9223372032559808512" {
  assert_eq(2147483647L << 32, 9223372032559808512L)
}

///|
test "2147483647 << 33 = -8589934592" {
  assert_eq(2147483647L << 33, -8589934592L)
}

///|
test "2147483647 << 63 = -9223372036854775808" {
  assert_eq(2147483647L << 63, -9223372036854775808L)
}

///|
test "2147483647 << 64 = 2147483647" {
  assert_eq(2147483647L << 64, 2147483647L)
}

///|
test "2147483647 << 65 = 4294967294" {
  assert_eq(2147483647L << 65, 4294967294L)
}

///|
test "-2147483648 << 0 = -2147483648" {
  assert_eq(-2147483648L << 0, -2147483648L)
}

///|
test "-2147483648 << 1 = -4294967296" {
  assert_eq(-2147483648L << 1, -4294967296L)
}

///|
test "-2147483648 << 31 = -4611686018427387904" {
  assert_eq(-2147483648L << 31, -4611686018427387904L)
}

///|
test "-2147483648 << 32 = -9223372036854775808" {
  assert_eq(-2147483648L << 32, -9223372036854775808L)
}

///|
test "-2147483648 << 33 = 0" {
  assert_eq(-2147483648L << 33, 0L)
}

///|
test "-2147483648 << 63 = 0" {
  assert_eq(-2147483648L << 63, 0L)
}

///|
test "-2147483648 << 64 = -2147483648" {
  assert_eq(-2147483648L << 64, -2147483648L)
}

///|
test "-2147483648 << 65 = -4294967296" {
  assert_eq(-2147483648L << 65, -4294967296L)
}

///|
test "2147483648 << 0 = 2147483648" {
  assert_eq(2147483648L << 0, 2147483648L)
}

///|
test "2147483648 << 1 = 4294967296" {
  assert_eq(2147483648L << 1, 4294967296L)
}

///|
test "2147483648 << 31 = 4611686018427387904" {
  assert_eq(2147483648L << 31, 4611686018427387904L)
}

///|
test "2147483648 << 32 = -9223372036854775808" {
  assert_eq(2147483648L << 32, -9223372036854775808L)
}

///|
test "2147483648 << 33 = 0" {
  assert_eq(2147483648L << 33, 0L)
}

///|
test "2147483648 << 63 = 0" {
  assert_eq(2147483648L << 63, 0L)
}

///|
test "2147483648 << 64 = 2147483648" {
  assert_eq(2147483648L << 64, 2147483648L)
}

///|
test "2147483648 << 65 = 4294967296" {
  assert_eq(2147483648L << 65, 4294967296L)
}

///|
test "-2147483649 << 0 = -2147483649" {
  assert_eq(-2147483649L << 0, -2147483649L)
}

///|
test "-2147483649 << 1 = -4294967298" {
  assert_eq(-2147483649L << 1, -4294967298L)
}

///|
test "-2147483649 << 31 = -4611686020574871552" {
  assert_eq(-2147483649L << 31, -4611686020574871552L)
}

///|
test "-2147483649 << 32 = 9223372032559808512" {
  assert_eq(-2147483649L << 32, 9223372032559808512L)
}

///|
test "-2147483649 << 33 = -8589934592" {
  assert_eq(-2147483649L << 33, -8589934592L)
}

///|
test "-2147483649 << 63 = -9223372036854775808" {
  assert_eq(-2147483649L << 63, -9223372036854775808L)
}

///|
test "-2147483649 << 64 = -2147483649" {
  assert_eq(-2147483649L << 64, -2147483649L)
}

///|
test "-2147483649 << 65 = -4294967298" {
  assert_eq(-2147483649L << 65, -4294967298L)
}

///|
test "9223372036854775807 << 0 = 9223372036854775807" {
  assert_eq(9223372036854775807L << 0, 9223372036854775807L)
}

///|
test "9223372036854775807 << 1 = -2" {
  assert_eq(9223372036854775807L << 1, -2L)
}

///|
test "9223372036854775807 << 31 = -2147483648" {
  assert_eq(9223372036854775807L << 31, -2147483648L)
}

///|
test "9223372036854775807 << 32 = -4294967296" {
  assert_eq(9223372036854775807L << 32, -4294967296L)
}

///|
test "9223372036854775807 << 33 = -8589934592" {
  assert_eq(9223372036854775807L << 33, -8589934592L)
}

///|
test "9223372036854775807 << 63 = -9223372036854775808" {
  assert_eq(9223372036854775807L << 63, -9223372036854775808L)
}

///|
test "9223372036854775807 << 64 = 9223372036854775807" {
  assert_eq(9223372036854775807L << 64, 9223372036854775807L)
}

///|
test "9223372036854775807 << 65 = -2" {
  assert_eq(9223372036854775807L << 65, -2L)
}

///|
test "-9223372036854775808 << 0 = -9223372036854775808" {
  assert_eq(-9223372036854775808L << 0, -9223372036854775808L)
}

///|
test "-9223372036854775808 << 1 = 0" {
  assert_eq(-9223372036854775808L << 1, 0L)
}

///|
test "-9223372036854775808 << 31 = 0" {
  assert_eq(-9223372036854775808L << 31, 0L)
}

///|
test "-9223372036854775808 << 32 = 0" {
  assert_eq(-9223372036854775808L << 32, 0L)
}

///|
test "-9223372036854775808 << 33 = 0" {
  assert_eq(-9223372036854775808L << 33, 0L)
}

///|
test "-9223372036854775808 << 63 = 0" {
  assert_eq(-9223372036854775808L << 63, 0L)
}

///|
test "-9223372036854775808 << 64 = -9223372036854775808" {
  assert_eq(-9223372036854775808L << 64, -9223372036854775808L)
}

///|
test "-9223372036854775808 << 65 = 0" {
  assert_eq(-9223372036854775808L << 65, 0L)
}

///|
test "-9223372036854775808 << 0 = -9223372036854775808" {
  assert_eq(-9223372036854775808L << 0, -9223372036854775808L)
}

///|
test "-9223372036854775808 << 1 = 0" {
  assert_eq(-9223372036854775808L << 1, 0L)
}

///|
test "-9223372036854775808 << 31 = 0" {
  assert_eq(-9223372036854775808L << 31, 0L)
}

///|
test "-9223372036854775808 << 32 = 0" {
  assert_eq(-9223372036854775808L << 32, 0L)
}

///|
test "-9223372036854775808 << 33 = 0" {
  assert_eq(-9223372036854775808L << 33, 0L)
}

///|
test "-9223372036854775808 << 63 = 0" {
  assert_eq(-9223372036854775808L << 63, 0L)
}

///|
test "-9223372036854775808 << 64 = -9223372036854775808" {
  assert_eq(-9223372036854775808L << 64, -9223372036854775808L)
}

///|
test "-9223372036854775808 << 65 = 0" {
  assert_eq(-9223372036854775808L << 65, 0L)
}

///|
test "9223372036854775807 << 0 = 9223372036854775807" {
  assert_eq(9223372036854775807L << 0, 9223372036854775807L)
}

///|
test "9223372036854775807 << 1 = -2" {
  assert_eq(9223372036854775807L << 1, -2L)
}

///|
test "9223372036854775807 << 31 = -2147483648" {
  assert_eq(9223372036854775807L << 31, -2147483648L)
}

///|
test "9223372036854775807 << 32 = -4294967296" {
  assert_eq(9223372036854775807L << 32, -4294967296L)
}

///|
test "9223372036854775807 << 33 = -8589934592" {
  assert_eq(9223372036854775807L << 33, -8589934592L)
}

///|
test "9223372036854775807 << 63 = -9223372036854775808" {
  assert_eq(9223372036854775807L << 63, -9223372036854775808L)
}

///|
test "9223372036854775807 << 64 = 9223372036854775807" {
  assert_eq(9223372036854775807L << 64, 9223372036854775807L)
}

///|
test "9223372036854775807 << 65 = -2" {
  assert_eq(9223372036854775807L << 65, -2L)
}

///|
fn shr_as_uint64(x : Int64, y : Int) -> Int64 {
  (x.reinterpret_as_uint64() >> y).reinterpret_as_int64()
}

///|
test "0 >>> 0 = 0" {
  assert_eq(shr_as_uint64(0L, 0), 0L)
}

///|
test "0 >>> 1 = 0" {
  assert_eq(shr_as_uint64(0L, 1), 0L)
}

///|
test "0 >>> 31 = 0" {
  assert_eq(shr_as_uint64(0L, 31), 0L)
}

///|
test "0 >>> 32 = 0" {
  assert_eq(shr_as_uint64(0L, 32), 0L)
}

///|
test "0 >>> 33 = 0" {
  assert_eq(shr_as_uint64(0L, 33), 0L)
}

///|
test "0 >>> 63 = 0" {
  assert_eq(shr_as_uint64(0L, 63), 0L)
}

///|
test "0 >>> 64 = 0" {
  assert_eq(shr_as_uint64(0L, 64), 0L)
}

///|
test "0 >>> 65 = 0" {
  assert_eq(shr_as_uint64(0L, 65), 0L)
}

///|
test "-1 >>> 0 = -1" {
  assert_eq(shr_as_uint64(-1L, 0), -1L)
}

///|
test "-1 >>> 1 = 9223372036854775807" {
  assert_eq(shr_as_uint64(-1L, 1), 9223372036854775807L)
}

///|
test "-1 >>> 31 = 8589934591" {
  assert_eq(shr_as_uint64(-1L, 31), 8589934591L)
}

///|
test "-1 >>> 32 = 4294967295" {
  assert_eq(shr_as_uint64(-1L, 32), 4294967295L)
}

///|
test "-1 >>> 33 = 2147483647" {
  assert_eq(shr_as_uint64(-1L, 33), 2147483647L)
}

///|
test "-1 >>> 63 = 1" {
  assert_eq(shr_as_uint64(-1L, 63), 1L)
}

///|
test "-1 >>> 64 = -1" {
  assert_eq(shr_as_uint64(-1L, 64), -1L)
}

///|
test "-1 >>> 65 = 9223372036854775807" {
  assert_eq(shr_as_uint64(-1L, 65), 9223372036854775807L)
}

///|
test "1 >>> 0 = 1" {
  assert_eq(shr_as_uint64(1L, 0), 1L)
}

///|
test "1 >>> 1 = 0" {
  assert_eq(shr_as_uint64(1L, 1), 0L)
}

///|
test "1 >>> 31 = 0" {
  assert_eq(shr_as_uint64(1L, 31), 0L)
}

///|
test "1 >>> 32 = 0" {
  assert_eq(shr_as_uint64(1L, 32), 0L)
}

///|
test "1 >>> 33 = 0" {
  assert_eq(shr_as_uint64(1L, 33), 0L)
}

///|
test "1 >>> 63 = 0" {
  assert_eq(shr_as_uint64(1L, 63), 0L)
}

///|
test "1 >>> 64 = 1" {
  assert_eq(shr_as_uint64(1L, 64), 1L)
}

///|
test "1 >>> 65 = 0" {
  assert_eq(shr_as_uint64(1L, 65), 0L)
}

///|
test "2147483647 >>> 0 = 2147483647" {
  assert_eq(shr_as_uint64(2147483647L, 0), 2147483647L)
}

///|
test "2147483647 >>> 1 = 1073741823" {
  assert_eq(shr_as_uint64(2147483647L, 1), 1073741823L)
}

///|
test "2147483647 >>> 31 = 0" {
  assert_eq(shr_as_uint64(2147483647L, 31), 0L)
}

///|
test "2147483647 >>> 32 = 0" {
  assert_eq(shr_as_uint64(2147483647L, 32), 0L)
}

///|
test "2147483647 >>> 33 = 0" {
  assert_eq(shr_as_uint64(2147483647L, 33), 0L)
}

///|
test "2147483647 >>> 63 = 0" {
  assert_eq(shr_as_uint64(2147483647L, 63), 0L)
}

///|
test "2147483647 >>> 64 = 2147483647" {
  assert_eq(shr_as_uint64(2147483647L, 64), 2147483647L)
}

///|
test "2147483647 >>> 65 = 1073741823" {
  assert_eq(shr_as_uint64(2147483647L, 65), 1073741823L)
}

///|
test "-2147483648 >>> 0 = -2147483648" {
  assert_eq(shr_as_uint64(-2147483648L, 0), -2147483648L)
}

///|
test "-2147483648 >>> 1 = 9223372035781033984" {
  assert_eq(shr_as_uint64(-2147483648L, 1), 9223372035781033984L)
}

///|
test "-2147483648 >>> 31 = 8589934591" {
  assert_eq(shr_as_uint64(-2147483648L, 31), 8589934591L)
}

///|
test "-2147483648 >>> 32 = 4294967295" {
  assert_eq(shr_as_uint64(-2147483648L, 32), 4294967295L)
}

///|
test "-2147483648 >>> 33 = 2147483647" {
  assert_eq(shr_as_uint64(-2147483648L, 33), 2147483647L)
}

///|
test "-2147483648 >>> 63 = 1" {
  assert_eq(shr_as_uint64(-2147483648L, 63), 1L)
}

///|
test "-2147483648 >>> 64 = -2147483648" {
  assert_eq(shr_as_uint64(-2147483648L, 64), -2147483648L)
}

///|
test "-2147483648 >>> 65 = 9223372035781033984" {
  assert_eq(shr_as_uint64(-2147483648L, 65), 9223372035781033984L)
}

///|
test "2147483648 >>> 0 = 2147483648" {
  assert_eq(shr_as_uint64(2147483648L, 0), 2147483648L)
}

///|
test "2147483648 >>> 1 = 1073741824" {
  assert_eq(shr_as_uint64(2147483648L, 1), 1073741824L)
}

///|
test "2147483648 >>> 31 = 1" {
  assert_eq(shr_as_uint64(2147483648L, 31), 1L)
}

///|
test "2147483648 >>> 32 = 0" {
  assert_eq(shr_as_uint64(2147483648L, 32), 0L)
}

///|
test "2147483648 >>> 33 = 0" {
  assert_eq(shr_as_uint64(2147483648L, 33), 0L)
}

///|
test "2147483648 >>> 63 = 0" {
  assert_eq(shr_as_uint64(2147483648L, 63), 0L)
}

///|
test "2147483648 >>> 64 = 2147483648" {
  assert_eq(shr_as_uint64(2147483648L, 64), 2147483648L)
}

///|
test "2147483648 >>> 65 = 1073741824" {
  assert_eq(shr_as_uint64(2147483648L, 65), 1073741824L)
}

///|
test "-2147483649 >>> 0 = -2147483649" {
  assert_eq(shr_as_uint64(-2147483649L, 0), -2147483649L)
}

///|
test "-2147483649 >>> 1 = 9223372035781033983" {
  assert_eq(shr_as_uint64(-2147483649L, 1), 9223372035781033983L)
}

///|
test "-2147483649 >>> 31 = 8589934590" {
  assert_eq(shr_as_uint64(-2147483649L, 31), 8589934590L)
}

///|
test "-2147483649 >>> 32 = 4294967295" {
  assert_eq(shr_as_uint64(-2147483649L, 32), 4294967295L)
}

///|
test "-2147483649 >>> 33 = 2147483647" {
  assert_eq(shr_as_uint64(-2147483649L, 33), 2147483647L)
}

///|
test "-2147483649 >>> 63 = 1" {
  assert_eq(shr_as_uint64(-2147483649L, 63), 1L)
}

///|
test "-2147483649 >>> 64 = -2147483649" {
  assert_eq(shr_as_uint64(-2147483649L, 64), -2147483649L)
}

///|
test "-2147483649 >>> 65 = 9223372035781033983" {
  assert_eq(shr_as_uint64(-2147483649L, 65), 9223372035781033983L)
}

///|
test "9223372036854775807 >>> 0 = 9223372036854775807" {
  assert_eq(shr_as_uint64(9223372036854775807L, 0), 9223372036854775807L)
}

///|
test "9223372036854775807 >>> 1 = 4611686018427387903" {
  assert_eq(shr_as_uint64(9223372036854775807L, 1), 4611686018427387903L)
}

///|
test "9223372036854775807 >>> 31 = 4294967295" {
  assert_eq(shr_as_uint64(9223372036854775807L, 31), 4294967295L)
}

///|
test "9223372036854775807 >>> 32 = 2147483647" {
  assert_eq(shr_as_uint64(9223372036854775807L, 32), 2147483647L)
}

///|
test "9223372036854775807 >>> 33 = 1073741823" {
  assert_eq(shr_as_uint64(9223372036854775807L, 33), 1073741823L)
}

///|
test "9223372036854775807 >>> 63 = 0" {
  assert_eq(shr_as_uint64(9223372036854775807L, 63), 0L)
}

///|
test "9223372036854775807 >>> 64 = 9223372036854775807" {
  assert_eq(shr_as_uint64(9223372036854775807L, 64), 9223372036854775807L)
}

///|
test "9223372036854775807 >>> 65 = 4611686018427387903" {
  assert_eq(shr_as_uint64(9223372036854775807L, 65), 4611686018427387903L)
}

///|
test "-9223372036854775808 >>> 0 = -9223372036854775808" {
  assert_eq(shr_as_uint64(-9223372036854775808L, 0), -9223372036854775808L)
}

///|
test "-9223372036854775808 >>> 1 = 4611686018427387904" {
  assert_eq(shr_as_uint64(-9223372036854775808L, 1), 4611686018427387904L)
}

///|
test "-9223372036854775808 >>> 31 = 4294967296" {
  assert_eq(shr_as_uint64(-9223372036854775808L, 31), 4294967296L)
}

///|
test "-9223372036854775808 >>> 32 = 2147483648" {
  assert_eq(shr_as_uint64(-9223372036854775808L, 32), 2147483648L)
}

///|
test "-9223372036854775808 >>> 33 = 1073741824" {
  assert_eq(shr_as_uint64(-9223372036854775808L, 33), 1073741824L)
}

///|
test "-9223372036854775808 >>> 63 = 1" {
  assert_eq(shr_as_uint64(-9223372036854775808L, 63), 1L)
}

///|
test "-9223372036854775808 >>> 64 = -9223372036854775808" {
  assert_eq(shr_as_uint64(-9223372036854775808L, 64), -9223372036854775808L)
}

///|
test "-9223372036854775808 >>> 65 = 4611686018427387904" {
  assert_eq(shr_as_uint64(-9223372036854775808L, 65), 4611686018427387904L)
}

///|
test "-9223372036854775808 >>> 0 = -9223372036854775808" {
  assert_eq(shr_as_uint64(-9223372036854775808L, 0), -9223372036854775808L)
}

///|
test "-9223372036854775808 >>> 1 = 4611686018427387904" {
  assert_eq(shr_as_uint64(-9223372036854775808L, 1), 4611686018427387904L)
}

///|
test "-9223372036854775808 >>> 31 = 4294967296" {
  assert_eq(shr_as_uint64(-9223372036854775808L, 31), 4294967296L)
}

///|
test "-9223372036854775808 >>> 32 = 2147483648" {
  assert_eq(shr_as_uint64(-9223372036854775808L, 32), 2147483648L)
}

///|
test "-9223372036854775808 >>> 33 = 1073741824" {
  assert_eq(shr_as_uint64(-9223372036854775808L, 33), 1073741824L)
}

///|
test "-9223372036854775808 >>> 63 = 1" {
  assert_eq(shr_as_uint64(-9223372036854775808L, 63), 1L)
}

///|
test "-9223372036854775808 >>> 64 = -9223372036854775808" {
  assert_eq(shr_as_uint64(-9223372036854775808L, 64), -9223372036854775808L)
}

///|
test "-9223372036854775808 >>> 65 = 4611686018427387904" {
  assert_eq(shr_as_uint64(-9223372036854775808L, 65), 4611686018427387904L)
}

///|
test "9223372036854775807 >>> 0 = 9223372036854775807" {
  assert_eq(shr_as_uint64(9223372036854775807L, 0), 9223372036854775807L)
}

///|
test "9223372036854775807 >>> 1 = 4611686018427387903" {
  assert_eq(shr_as_uint64(9223372036854775807L, 1), 4611686018427387903L)
}

///|
test "9223372036854775807 >>> 31 = 4294967295" {
  assert_eq(shr_as_uint64(9223372036854775807L, 31), 4294967295L)
}

///|
test "9223372036854775807 >>> 32 = 2147483647" {
  assert_eq(shr_as_uint64(9223372036854775807L, 32), 2147483647L)
}

///|
test "9223372036854775807 >>> 33 = 1073741823" {
  assert_eq(shr_as_uint64(9223372036854775807L, 33), 1073741823L)
}

///|
test "9223372036854775807 >>> 63 = 0" {
  assert_eq(shr_as_uint64(9223372036854775807L, 63), 0L)
}

///|
test "9223372036854775807 >>> 64 = 9223372036854775807" {
  assert_eq(shr_as_uint64(9223372036854775807L, 64), 9223372036854775807L)
}

///|
test "9223372036854775807 >>> 65 = 4611686018427387903" {
  assert_eq(shr_as_uint64(9223372036854775807L, 65), 4611686018427387903L)
}

///|
test "0 >> 0 = 0" {
  assert_eq(0L >> 0, 0L)
}

///|
test "0 >> 1 = 0" {
  assert_eq(0L >> 1, 0L)
}

///|
test "0 >> 31 = 0" {
  assert_eq(0L >> 31, 0L)
}

///|
test "0 >> 32 = 0" {
  assert_eq(0L >> 32, 0L)
}

///|
test "0 >> 33 = 0" {
  assert_eq(0L >> 33, 0L)
}

///|
test "0 >> 63 = 0" {
  assert_eq(0L >> 63, 0L)
}

///|
test "0 >> 64 = 0" {
  assert_eq(0L >> 64, 0L)
}

///|
test "0 >> 65 = 0" {
  assert_eq(0L >> 65, 0L)
}

///|
test "-1 >> 0 = -1" {
  assert_eq(-1L >> 0, -1L)
}

///|
test "-1 >> 1 = -1" {
  assert_eq(-1L >> 1, -1L)
}

///|
test "-1 >> 31 = -1" {
  assert_eq(-1L >> 31, -1L)
}

///|
test "-1 >> 32 = -1" {
  assert_eq(-1L >> 32, -1L)
}

///|
test "-1 >> 33 = -1" {
  assert_eq(-1L >> 33, -1L)
}

///|
test "-1 >> 63 = -1" {
  assert_eq(-1L >> 63, -1L)
}

///|
test "-1 >> 64 = -1" {
  assert_eq(-1L >> 64, -1L)
}

///|
test "-1 >> 65 = -1" {
  assert_eq(-1L >> 65, -1L)
}

///|
test "1 >> 0 = 1" {
  assert_eq(1L >> 0, 1L)
}

///|
test "1 >> 1 = 0" {
  assert_eq(1L >> 1, 0L)
}

///|
test "1 >> 31 = 0" {
  assert_eq(1L >> 31, 0L)
}

///|
test "1 >> 32 = 0" {
  assert_eq(1L >> 32, 0L)
}

///|
test "1 >> 33 = 0" {
  assert_eq(1L >> 33, 0L)
}

///|
test "1 >> 63 = 0" {
  assert_eq(1L >> 63, 0L)
}

///|
test "1 >> 64 = 1" {
  assert_eq(1L >> 64, 1L)
}

///|
test "1 >> 65 = 0" {
  assert_eq(1L >> 65, 0L)
}

///|
test "2147483647 >> 0 = 2147483647" {
  assert_eq(2147483647L >> 0, 2147483647L)
}

///|
test "2147483647 >> 1 = 1073741823" {
  assert_eq(2147483647L >> 1, 1073741823L)
}

///|
test "2147483647 >> 31 = 0" {
  assert_eq(2147483647L >> 31, 0L)
}

///|
test "2147483647 >> 32 = 0" {
  assert_eq(2147483647L >> 32, 0L)
}

///|
test "2147483647 >> 33 = 0" {
  assert_eq(2147483647L >> 33, 0L)
}

///|
test "2147483647 >> 63 = 0" {
  assert_eq(2147483647L >> 63, 0L)
}

///|
test "2147483647 >> 64 = 2147483647" {
  assert_eq(2147483647L >> 64, 2147483647L)
}

///|
test "2147483647 >> 65 = 1073741823" {
  assert_eq(2147483647L >> 65, 1073741823L)
}

///|
test "-2147483648 >> 0 = -2147483648" {
  assert_eq(-2147483648L >> 0, -2147483648L)
}

///|
test "-2147483648 >> 1 = -1073741824" {
  assert_eq(-2147483648L >> 1, -1073741824L)
}

///|
test "-2147483648 >> 31 = -1" {
  assert_eq(-2147483648L >> 31, -1L)
}

///|
test "-2147483648 >> 32 = -1" {
  assert_eq(-2147483648L >> 32, -1L)
}

///|
test "-2147483648 >> 33 = -1" {
  assert_eq(-2147483648L >> 33, -1L)
}

///|
test "-2147483648 >> 63 = -1" {
  assert_eq(-2147483648L >> 63, -1L)
}

///|
test "-2147483648 >> 64 = -2147483648" {
  assert_eq(-2147483648L >> 64, -2147483648L)
}

///|
test "-2147483648 >> 65 = -1073741824" {
  assert_eq(-2147483648L >> 65, -1073741824L)
}

///|
test "2147483648 >> 0 = 2147483648" {
  assert_eq(2147483648L >> 0, 2147483648L)
}

///|
test "2147483648 >> 1 = 1073741824" {
  assert_eq(2147483648L >> 1, 1073741824L)
}

///|
test "2147483648 >> 31 = 1" {
  assert_eq(2147483648L >> 31, 1L)
}

///|
test "2147483648 >> 32 = 0" {
  assert_eq(2147483648L >> 32, 0L)
}

///|
test "2147483648 >> 33 = 0" {
  assert_eq(2147483648L >> 33, 0L)
}

///|
test "2147483648 >> 63 = 0" {
  assert_eq(2147483648L >> 63, 0L)
}

///|
test "2147483648 >> 64 = 2147483648" {
  assert_eq(2147483648L >> 64, 2147483648L)
}

///|
test "2147483648 >> 65 = 1073741824" {
  assert_eq(2147483648L >> 65, 1073741824L)
}

///|
test "-2147483649 >> 0 = -2147483649" {
  assert_eq(-2147483649L >> 0, -2147483649L)
}

///|
test "-2147483649 >> 1 = -1073741825" {
  assert_eq(-2147483649L >> 1, -1073741825L)
}

///|
test "-2147483649 >> 31 = -2" {
  assert_eq(-2147483649L >> 31, -2L)
}

///|
test "-2147483649 >> 32 = -1" {
  assert_eq(-2147483649L >> 32, -1L)
}

///|
test "-2147483649 >> 33 = -1" {
  assert_eq(-2147483649L >> 33, -1L)
}

///|
test "-2147483649 >> 63 = -1" {
  assert_eq(-2147483649L >> 63, -1L)
}

///|
test "-2147483649 >> 64 = -2147483649" {
  assert_eq(-2147483649L >> 64, -2147483649L)
}

///|
test "-2147483649 >> 65 = -1073741825" {
  assert_eq(-2147483649L >> 65, -1073741825L)
}

///|
test "9223372036854775807 >> 0 = 9223372036854775807" {
  assert_eq(9223372036854775807L >> 0, 9223372036854775807L)
}

///|
test "9223372036854775807 >> 1 = 4611686018427387903" {
  assert_eq(9223372036854775807L >> 1, 4611686018427387903L)
}

///|
test "9223372036854775807 >> 31 = 4294967295" {
  assert_eq(9223372036854775807L >> 31, 4294967295L)
}

///|
test "9223372036854775807 >> 32 = 2147483647" {
  assert_eq(9223372036854775807L >> 32, 2147483647L)
}

///|
test "9223372036854775807 >> 33 = 1073741823" {
  assert_eq(9223372036854775807L >> 33, 1073741823L)
}

///|
test "9223372036854775807 >> 63 = 0" {
  assert_eq(9223372036854775807L >> 63, 0L)
}

///|
test "9223372036854775807 >> 64 = 9223372036854775807" {
  assert_eq(9223372036854775807L >> 64, 9223372036854775807L)
}

///|
test "9223372036854775807 >> 65 = 4611686018427387903" {
  assert_eq(9223372036854775807L >> 65, 4611686018427387903L)
}

///|
test "-9223372036854775808 >> 0 = -9223372036854775808" {
  assert_eq(-9223372036854775808L >> 0, -9223372036854775808L)
}

///|
test "-9223372036854775808 >> 1 = -4611686018427387904" {
  assert_eq(-9223372036854775808L >> 1, -4611686018427387904L)
}

///|
test "-9223372036854775808 >> 31 = -4294967296" {
  assert_eq(-9223372036854775808L >> 31, -4294967296L)
}

///|
test "-9223372036854775808 >> 32 = -2147483648" {
  assert_eq(-9223372036854775808L >> 32, -2147483648L)
}

///|
test "-9223372036854775808 >> 33 = -1073741824" {
  assert_eq(-9223372036854775808L >> 33, -1073741824L)
}

///|
test "-9223372036854775808 >> 63 = -1" {
  assert_eq(-9223372036854775808L >> 63, -1L)
}

///|
test "-9223372036854775808 >> 64 = -9223372036854775808" {
  assert_eq(-9223372036854775808L >> 64, -9223372036854775808L)
}

///|
test "-9223372036854775808 >> 65 = -4611686018427387904" {
  assert_eq(-9223372036854775808L >> 65, -4611686018427387904L)
}

///|
test "-9223372036854775808 >> 0 = -9223372036854775808" {
  assert_eq(-9223372036854775808L >> 0, -9223372036854775808L)
}

///|
test "-9223372036854775808 >> 1 = -4611686018427387904" {
  assert_eq(-9223372036854775808L >> 1, -4611686018427387904L)
}

///|
test "-9223372036854775808 >> 31 = -4294967296" {
  assert_eq(-9223372036854775808L >> 31, -4294967296L)
}

///|
test "-9223372036854775808 >> 32 = -2147483648" {
  assert_eq(-9223372036854775808L >> 32, -2147483648L)
}

///|
test "-9223372036854775808 >> 33 = -1073741824" {
  assert_eq(-9223372036854775808L >> 33, -1073741824L)
}

///|
test "-9223372036854775808 >> 63 = -1" {
  assert_eq(-9223372036854775808L >> 63, -1L)
}

///|
test "-9223372036854775808 >> 64 = -9223372036854775808" {
  assert_eq(-9223372036854775808L >> 64, -9223372036854775808L)
}

///|
test "-9223372036854775808 >> 65 = -4611686018427387904" {
  assert_eq(-9223372036854775808L >> 65, -4611686018427387904L)
}

///|
test "9223372036854775807 >> 0 = 9223372036854775807" {
  assert_eq(9223372036854775807L >> 0, 9223372036854775807L)
}

///|
test "9223372036854775807 >> 1 = 4611686018427387903" {
  assert_eq(9223372036854775807L >> 1, 4611686018427387903L)
}

///|
test "9223372036854775807 >> 31 = 4294967295" {
  assert_eq(9223372036854775807L >> 31, 4294967295L)
}

///|
test "9223372036854775807 >> 32 = 2147483647" {
  assert_eq(9223372036854775807L >> 32, 2147483647L)
}

///|
test "9223372036854775807 >> 33 = 1073741823" {
  assert_eq(9223372036854775807L >> 33, 1073741823L)
}

///|
test "9223372036854775807 >> 63 = 0" {
  assert_eq(9223372036854775807L >> 63, 0L)
}

///|
test "9223372036854775807 >> 64 = 9223372036854775807" {
  assert_eq(9223372036854775807L >> 64, 9223372036854775807L)
}

///|
test "9223372036854775807 >> 65 = 4611686018427387903" {
  assert_eq(9223372036854775807L >> 65, 4611686018427387903L)
}

///|
test "compare(0, 0) = 0" {
  assert_eq(0L.compare(0L), 0)
}

///|
test "compare(0, -1) = 1" {
  assert_eq(0L.compare(-1L), 1)
}

///|
test "compare(0, 1) = -1" {
  assert_eq(0L.compare(1L), -1)
}

///|
test "compare(0, 2147483647) = -1" {
  assert_eq(0L.compare(2147483647L), -1)
}

///|
test "compare(0, -2147483648) = 1" {
  assert_eq(0L.compare(-2147483648L), 1)
}

///|
test "compare(0, 2147483648) = -1" {
  assert_eq(0L.compare(2147483648L), -1)
}

///|
test "compare(0, -2147483649) = 1" {
  assert_eq(0L.compare(-2147483649L), 1)
}

///|
test "compare(0, 9223372036854775807) = -1" {
  assert_eq(0L.compare(9223372036854775807L), -1)
}

///|
test "compare(0, -9223372036854775808) = 1" {
  assert_eq(0L.compare(-9223372036854775808L), 1)
}

///|
test "compare(0, -9223372036854775808) = 1" {
  assert_eq(0L.compare(-9223372036854775808L), 1)
}

///|
test "compare(0, 9223372036854775807) = -1" {
  assert_eq(0L.compare(9223372036854775807L), -1)
}

///|
test "compare(-1, 0) = -1" {
  assert_eq((-1L).compare(0L), -1)
}

///|
test "compare(-1, -1) = 0" {
  assert_eq((-1L).compare(-1L), 0)
}

///|
test "compare(-1, 1) = -1" {
  assert_eq((-1L).compare(1L), -1)
}

///|
test "compare(-1, 2147483647) = -1" {
  assert_eq((-1L).compare(2147483647L), -1)
}

///|
test "compare(-1, -2147483648) = 1" {
  assert_eq((-1L).compare(-2147483648L), 1)
}

///|
test "compare(-1, 2147483648) = -1" {
  assert_eq((-1L).compare(2147483648L), -1)
}

///|
test "compare(-1, -2147483649) = 1" {
  assert_eq((-1L).compare(-2147483649L), 1)
}

///|
test "compare(-1, 9223372036854775807) = -1" {
  assert_eq((-1L).compare(9223372036854775807L), -1)
}

///|
test "compare(-1, -9223372036854775808) = 1" {
  assert_eq((-1L).compare(-9223372036854775808L), 1)
}

///|
test "compare(-1, -9223372036854775808) = 1" {
  assert_eq((-1L).compare(-9223372036854775808L), 1)
}

///|
test "compare(-1, 9223372036854775807) = -1" {
  assert_eq((-1L).compare(9223372036854775807L), -1)
}

///|
test "compare(1, 0) = 1" {
  assert_eq(1L.compare(0L), 1)
}

///|
test "compare(1, -1) = 1" {
  assert_eq(1L.compare(-1L), 1)
}

///|
test "compare(1, 1) = 0" {
  assert_eq(1L.compare(1L), 0)
}

///|
test "compare(1, 2147483647) = -1" {
  assert_eq(1L.compare(2147483647L), -1)
}

///|
test "compare(1, -2147483648) = 1" {
  assert_eq(1L.compare(-2147483648L), 1)
}

///|
test "compare(1, 2147483648) = -1" {
  assert_eq(1L.compare(2147483648L), -1)
}

///|
test "compare(1, -2147483649) = 1" {
  assert_eq(1L.compare(-2147483649L), 1)
}

///|
test "compare(1, 9223372036854775807) = -1" {
  assert_eq(1L.compare(9223372036854775807L), -1)
}

///|
test "compare(1, -9223372036854775808) = 1" {
  assert_eq(1L.compare(-9223372036854775808L), 1)
}

///|
test "compare(1, -9223372036854775808) = 1" {
  assert_eq(1L.compare(-9223372036854775808L), 1)
}

///|
test "compare(1, 9223372036854775807) = -1" {
  assert_eq(1L.compare(9223372036854775807L), -1)
}

///|
test "compare(2147483647, 0) = 1" {
  assert_eq(2147483647L.compare(0L), 1)
}

///|
test "compare(2147483647, -1) = 1" {
  assert_eq(2147483647L.compare(-1L), 1)
}

///|
test "compare(2147483647, 1) = 1" {
  assert_eq(2147483647L.compare(1L), 1)
}

///|
test "compare(2147483647, 2147483647) = 0" {
  assert_eq(2147483647L.compare(2147483647L), 0)
}

///|
test "compare(2147483647, -2147483648) = 1" {
  assert_eq(2147483647L.compare(-2147483648L), 1)
}

///|
test "compare(2147483647, 2147483648) = -1" {
  assert_eq(2147483647L.compare(2147483648L), -1)
}

///|
test "compare(2147483647, -2147483649) = 1" {
  assert_eq(2147483647L.compare(-2147483649L), 1)
}

///|
test "compare(2147483647, 9223372036854775807) = -1" {
  assert_eq(2147483647L.compare(9223372036854775807L), -1)
}

///|
test "compare(2147483647, -9223372036854775808) = 1" {
  assert_eq(2147483647L.compare(-9223372036854775808L), 1)
}

///|
test "compare(2147483647, -9223372036854775808) = 1" {
  assert_eq(2147483647L.compare(-9223372036854775808L), 1)
}

///|
test "compare(2147483647, 9223372036854775807) = -1" {
  assert_eq(2147483647L.compare(9223372036854775807L), -1)
}

///|
test "compare(-2147483648, 0) = -1" {
  assert_eq((-2147483648L).compare(0L), -1)
}

///|
test "compare(-2147483648, -1) = -1" {
  assert_eq((-2147483648L).compare(-1L), -1)
}

///|
test "compare(-2147483648, 1) = -1" {
  assert_eq((-2147483648L).compare(1L), -1)
}

///|
test "compare(-2147483648, 2147483647) = -1" {
  assert_eq((-2147483648L).compare(2147483647L), -1)
}

///|
test "compare(-2147483648, -2147483648) = 0" {
  assert_eq((-2147483648L).compare(-2147483648L), 0)
}

///|
test "compare(-2147483648, 2147483648) = -1" {
  assert_eq((-2147483648L).compare(2147483648L), -1)
}

///|
test "compare(-2147483648, -2147483649) = 1" {
  assert_eq((-2147483648L).compare(-2147483649L), 1)
}

///|
test "compare(-2147483648, 9223372036854775807) = -1" {
  assert_eq((-2147483648L).compare(9223372036854775807L), -1)
}

///|
test "compare(-2147483648, -9223372036854775808) = 1" {
  assert_eq((-2147483648L).compare(-9223372036854775808L), 1)
}

///|
test "compare(-2147483648, -9223372036854775808) = 1" {
  assert_eq((-2147483648L).compare(-9223372036854775808L), 1)
}

///|
test "compare(-2147483648, 9223372036854775807) = -1" {
  assert_eq((-2147483648L).compare(9223372036854775807L), -1)
}

///|
test "compare(2147483648, 0) = 1" {
  assert_eq(2147483648L.compare(0L), 1)
}

///|
test "compare(2147483648, -1) = 1" {
  assert_eq(2147483648L.compare(-1L), 1)
}

///|
test "compare(2147483648, 1) = 1" {
  assert_eq(2147483648L.compare(1L), 1)
}

///|
test "compare(2147483648, 2147483647) = 1" {
  assert_eq(2147483648L.compare(2147483647L), 1)
}

///|
test "compare(2147483648, -2147483648) = 1" {
  assert_eq(2147483648L.compare(-2147483648L), 1)
}

///|
test "compare(2147483648, 2147483648) = 0" {
  assert_eq(2147483648L.compare(2147483648L), 0)
}

///|
test "compare(2147483648, -2147483649) = 1" {
  assert_eq(2147483648L.compare(-2147483649L), 1)
}

///|
test "compare(2147483648, 9223372036854775807) = -1" {
  assert_eq(2147483648L.compare(9223372036854775807L), -1)
}

///|
test "compare(2147483648, -9223372036854775808) = 1" {
  assert_eq(2147483648L.compare(-9223372036854775808L), 1)
}

///|
test "compare(2147483648, -9223372036854775808) = 1" {
  assert_eq(2147483648L.compare(-9223372036854775808L), 1)
}

///|
test "compare(2147483648, 9223372036854775807) = -1" {
  assert_eq(2147483648L.compare(9223372036854775807L), -1)
}

///|
test "compare(-2147483649, 0) = -1" {
  assert_eq((-2147483649L).compare(0L), -1)
}

///|
test "compare(-2147483649, -1) = -1" {
  assert_eq((-2147483649L).compare(-1L), -1)
}

///|
test "compare(-2147483649, 1) = -1" {
  assert_eq((-2147483649L).compare(1L), -1)
}

///|
test "compare(-2147483649, 2147483647) = -1" {
  assert_eq((-2147483649L).compare(2147483647L), -1)
}

///|
test "compare(-2147483649, -2147483648) = -1" {
  assert_eq((-2147483649L).compare(-2147483648L), -1)
}

///|
test "compare(-2147483649, 2147483648) = -1" {
  assert_eq((-2147483649L).compare(2147483648L), -1)
}

///|
test "compare(-2147483649, -2147483649) = 0" {
  assert_eq((-2147483649L).compare(-2147483649L), 0)
}

///|
test "compare(-2147483649, 9223372036854775807) = -1" {
  assert_eq((-2147483649L).compare(9223372036854775807L), -1)
}

///|
test "compare(-2147483649, -9223372036854775808) = 1" {
  assert_eq((-2147483649L).compare(-9223372036854775808L), 1)
}

///|
test "compare(-2147483649, -9223372036854775808) = 1" {
  assert_eq((-2147483649L).compare(-9223372036854775808L), 1)
}

///|
test "compare(-2147483649, 9223372036854775807) = -1" {
  assert_eq((-2147483649L).compare(9223372036854775807L), -1)
}

///|
test "compare(9223372036854775807, 0) = 1" {
  assert_eq(9223372036854775807L.compare(0L), 1)
}

///|
test "compare(9223372036854775807, -1) = 1" {
  assert_eq(9223372036854775807L.compare(-1L), 1)
}

///|
test "compare(9223372036854775807, 1) = 1" {
  assert_eq(9223372036854775807L.compare(1L), 1)
}

///|
test "compare(9223372036854775807, 2147483647) = 1" {
  assert_eq(9223372036854775807L.compare(2147483647L), 1)
}

///|
test "compare(9223372036854775807, -2147483648) = 1" {
  assert_eq(9223372036854775807L.compare(-2147483648L), 1)
}

///|
test "compare(9223372036854775807, 2147483648) = 1" {
  assert_eq(9223372036854775807L.compare(2147483648L), 1)
}

///|
test "compare(9223372036854775807, -2147483649) = 1" {
  assert_eq(9223372036854775807L.compare(-2147483649L), 1)
}

///|
test "compare(9223372036854775807, 9223372036854775807) = 0" {
  assert_eq(9223372036854775807L.compare(9223372036854775807L), 0)
}

///|
test "compare(9223372036854775807, -9223372036854775808) = 1" {
  assert_eq(9223372036854775807L.compare(-9223372036854775808L), 1)
}

///|
test "compare(9223372036854775807, -9223372036854775808) = 1" {
  assert_eq(9223372036854775807L.compare(-9223372036854775808L), 1)
}

///|
test "compare(9223372036854775807, 9223372036854775807) = 0" {
  assert_eq(9223372036854775807L.compare(9223372036854775807L), 0)
}

///|
test "compare(-9223372036854775808, 0) = -1" {
  assert_eq((-9223372036854775808L).compare(0L), -1)
}

///|
test "compare(-9223372036854775808, -1) = -1" {
  assert_eq((-9223372036854775808L).compare(-1L), -1)
}

///|
test "compare(-9223372036854775808, 1) = -1" {
  assert_eq((-9223372036854775808L).compare(1L), -1)
}

///|
test "compare(-9223372036854775808, 2147483647) = -1" {
  assert_eq((-9223372036854775808L).compare(2147483647L), -1)
}

///|
test "compare(-9223372036854775808, -2147483648) = -1" {
  assert_eq((-9223372036854775808L).compare(-2147483648L), -1)
}

///|
test "compare(-9223372036854775808, 2147483648) = -1" {
  assert_eq((-9223372036854775808L).compare(2147483648L), -1)
}

///|
test "compare(-9223372036854775808, -2147483649) = -1" {
  assert_eq((-9223372036854775808L).compare(-2147483649L), -1)
}

///|
test "compare(-9223372036854775808, 9223372036854775807) = -1" {
  assert_eq((-9223372036854775808L).compare(9223372036854775807L), -1)
}

///|
test "compare(-9223372036854775808, -9223372036854775808) = 0" {
  assert_eq((-9223372036854775808L).compare(-9223372036854775808L), 0)
}

///|
test "compare(-9223372036854775808, -9223372036854775808) = 0" {
  assert_eq((-9223372036854775808L).compare(-9223372036854775808L), 0)
}

///|
test "compare(-9223372036854775808, 9223372036854775807) = -1" {
  assert_eq((-9223372036854775808L).compare(9223372036854775807L), -1)
}

///|
test "compare(-9223372036854775808, 0) = -1" {
  assert_eq((-9223372036854775808L).compare(0L), -1)
}

///|
test "compare(-9223372036854775808, -1) = -1" {
  assert_eq((-9223372036854775808L).compare(-1L), -1)
}

///|
test "compare(-9223372036854775808, 1) = -1" {
  assert_eq((-9223372036854775808L).compare(1L), -1)
}

///|
test "compare(-9223372036854775808, 2147483647) = -1" {
  assert_eq((-9223372036854775808L).compare(2147483647L), -1)
}

///|
test "compare(-9223372036854775808, -2147483648) = -1" {
  assert_eq((-9223372036854775808L).compare(-2147483648L), -1)
}

///|
test "compare(-9223372036854775808, 2147483648) = -1" {
  assert_eq((-9223372036854775808L).compare(2147483648L), -1)
}

///|
test "compare(-9223372036854775808, -2147483649) = -1" {
  assert_eq((-9223372036854775808L).compare(-2147483649L), -1)
}

///|
test "compare(-9223372036854775808, 9223372036854775807) = -1" {
  assert_eq((-9223372036854775808L).compare(9223372036854775807L), -1)
}

///|
test "compare(-9223372036854775808, -9223372036854775808) = 0" {
  assert_eq((-9223372036854775808L).compare(-9223372036854775808L), 0)
}

///|
test "compare(-9223372036854775808, -9223372036854775808) = 0" {
  assert_eq((-9223372036854775808L).compare(-9223372036854775808L), 0)
}

///|
test "compare(-9223372036854775808, 9223372036854775807) = -1" {
  assert_eq((-9223372036854775808L).compare(9223372036854775807L), -1)
}

///|
test "compare(9223372036854775807, 0) = 1" {
  assert_eq(9223372036854775807L.compare(0L), 1)
}

///|
test "compare(9223372036854775807, -1) = 1" {
  assert_eq(9223372036854775807L.compare(-1L), 1)
}

///|
test "compare(9223372036854775807, 1) = 1" {
  assert_eq(9223372036854775807L.compare(1L), 1)
}

///|
test "compare(9223372036854775807, 2147483647) = 1" {
  assert_eq(9223372036854775807L.compare(2147483647L), 1)
}

///|
test "compare(9223372036854775807, -2147483648) = 1" {
  assert_eq(9223372036854775807L.compare(-2147483648L), 1)
}

///|
test "compare(9223372036854775807, 2147483648) = 1" {
  assert_eq(9223372036854775807L.compare(2147483648L), 1)
}

///|
test "compare(9223372036854775807, -2147483649) = 1" {
  assert_eq(9223372036854775807L.compare(-2147483649L), 1)
}

///|
test "compare(9223372036854775807, 9223372036854775807) = 0" {
  assert_eq(9223372036854775807L.compare(9223372036854775807L), 0)
}

///|
test "compare(9223372036854775807, -9223372036854775808) = 1" {
  assert_eq(9223372036854775807L.compare(-9223372036854775808L), 1)
}

///|
test "compare(9223372036854775807, -9223372036854775808) = 1" {
  assert_eq(9223372036854775807L.compare(-9223372036854775808L), 1)
}

///|
test "compare(9223372036854775807, 9223372036854775807) = 0" {
  assert_eq(9223372036854775807L.compare(9223372036854775807L), 0)
}

///|
fn test_compare_u(x : Int64, y : Int64) -> Int {
  x.reinterpret_as_uint64().compare(y.reinterpret_as_uint64())
}

///|
test "test_compare_u(0, 0) = 0" {
  assert_eq(test_compare_u(0L, 0L), 0)
}

///|
test "test_compare_u(0, -1) = -1" {
  assert_eq(test_compare_u(0L, -1L), -1)
}

///|
test "test_compare_u(0, 1) = -1" {
  assert_eq(test_compare_u(0L, 1L), -1)
}

///|
test "test_compare_u(0, 2147483647) = -1" {
  assert_eq(test_compare_u(0L, 2147483647L), -1)
}

///|
test "test_compare_u(0, -2147483648) = -1" {
  assert_eq(test_compare_u(0L, -2147483648L), -1)
}

///|
test "test_compare_u(0, 2147483648) = -1" {
  assert_eq(test_compare_u(0L, 2147483648L), -1)
}

///|
test "test_compare_u(0, -2147483649) = -1" {
  assert_eq(test_compare_u(0L, -2147483649L), -1)
}

///|
test "test_compare_u(0, 9223372036854775807) = -1" {
  assert_eq(test_compare_u(0L, 9223372036854775807L), -1)
}

///|
test "test_compare_u(0, -9223372036854775808) = -1" {
  assert_eq(test_compare_u(0L, -9223372036854775808L), -1)
}

///|
test "test_compare_u(0, -9223372036854775808) = -1" {
  assert_eq(test_compare_u(0L, -9223372036854775808L), -1)
}

///|
test "test_compare_u(0, 9223372036854775807) = -1" {
  assert_eq(test_compare_u(0L, 9223372036854775807L), -1)
}

///|
test "test_compare_u(-1, 0) = 1" {
  assert_eq(test_compare_u(-1L, 0L), 1)
}

///|
test "test_compare_u(-1, -1) = 0" {
  assert_eq(test_compare_u(-1L, -1L), 0)
}

///|
test "test_compare_u(-1, 1) = 1" {
  assert_eq(test_compare_u(-1L, 1L), 1)
}

///|
test "test_compare_u(-1, 2147483647) = 1" {
  assert_eq(test_compare_u(-1L, 2147483647L), 1)
}

///|
test "test_compare_u(-1, -2147483648) = 1" {
  assert_eq(test_compare_u(-1L, -2147483648L), 1)
}

///|
test "test_compare_u(-1, 2147483648) = 1" {
  assert_eq(test_compare_u(-1L, 2147483648L), 1)
}

///|
test "test_compare_u(-1, -2147483649) = 1" {
  assert_eq(test_compare_u(-1L, -2147483649L), 1)
}

///|
test "test_compare_u(-1, 9223372036854775807) = 1" {
  assert_eq(test_compare_u(-1L, 9223372036854775807L), 1)
}

///|
test "test_compare_u(-1, -9223372036854775808) = 1" {
  assert_eq(test_compare_u(-1L, -9223372036854775808L), 1)
}

///|
test "test_compare_u(-1, -9223372036854775808) = 1" {
  assert_eq(test_compare_u(-1L, -9223372036854775808L), 1)
}

///|
test "test_compare_u(-1, 9223372036854775807) = 1" {
  assert_eq(test_compare_u(-1L, 9223372036854775807L), 1)
}

///|
test "test_compare_u(1, 0) = 1" {
  assert_eq(test_compare_u(1L, 0L), 1)
}

///|
test "test_compare_u(1, -1) = -1" {
  assert_eq(test_compare_u(1L, -1L), -1)
}

///|
test "test_compare_u(1, 1) = 0" {
  assert_eq(test_compare_u(1L, 1L), 0)
}

///|
test "test_compare_u(1, 2147483647) = -1" {
  assert_eq(test_compare_u(1L, 2147483647L), -1)
}

///|
test "test_compare_u(1, -2147483648) = -1" {
  assert_eq(test_compare_u(1L, -2147483648L), -1)
}

///|
test "test_compare_u(1, 2147483648) = -1" {
  assert_eq(test_compare_u(1L, 2147483648L), -1)
}

///|
test "test_compare_u(1, -2147483649) = -1" {
  assert_eq(test_compare_u(1L, -2147483649L), -1)
}

///|
test "test_compare_u(1, 9223372036854775807) = -1" {
  assert_eq(test_compare_u(1L, 9223372036854775807L), -1)
}

///|
test "test_compare_u(1, -9223372036854775808) = -1" {
  assert_eq(test_compare_u(1L, -9223372036854775808L), -1)
}

///|
test "test_compare_u(1, -9223372036854775808) = -1" {
  assert_eq(test_compare_u(1L, -9223372036854775808L), -1)
}

///|
test "test_compare_u(1, 9223372036854775807) = -1" {
  assert_eq(test_compare_u(1L, 9223372036854775807L), -1)
}

///|
test "test_compare_u(2147483647, 0) = 1" {
  assert_eq(test_compare_u(2147483647L, 0L), 1)
}

///|
test "test_compare_u(2147483647, -1) = -1" {
  assert_eq(test_compare_u(2147483647L, -1L), -1)
}

///|
test "test_compare_u(2147483647, 1) = 1" {
  assert_eq(test_compare_u(2147483647L, 1L), 1)
}

///|
test "test_compare_u(2147483647, 2147483647) = 0" {
  assert_eq(test_compare_u(2147483647L, 2147483647L), 0)
}

///|
test "test_compare_u(2147483647, -2147483648) = -1" {
  assert_eq(test_compare_u(2147483647L, -2147483648L), -1)
}

///|
test "test_compare_u(2147483647, 2147483648) = -1" {
  assert_eq(test_compare_u(2147483647L, 2147483648L), -1)
}

///|
test "test_compare_u(2147483647, -2147483649) = -1" {
  assert_eq(test_compare_u(2147483647L, -2147483649L), -1)
}

///|
test "test_compare_u(2147483647, 9223372036854775807) = -1" {
  assert_eq(test_compare_u(2147483647L, 9223372036854775807L), -1)
}

///|
test "test_compare_u(2147483647, -9223372036854775808) = -1" {
  assert_eq(test_compare_u(2147483647L, -9223372036854775808L), -1)
}

///|
test "test_compare_u(2147483647, -9223372036854775808) = -1" {
  assert_eq(test_compare_u(2147483647L, -9223372036854775808L), -1)
}

///|
test "test_compare_u(2147483647, 9223372036854775807) = -1" {
  assert_eq(test_compare_u(2147483647L, 9223372036854775807L), -1)
}

///|
test "test_compare_u(-2147483648, 0) = 1" {
  assert_eq(test_compare_u(-2147483648L, 0L), 1)
}

///|
test "test_compare_u(-2147483648, -1) = -1" {
  assert_eq(test_compare_u(-2147483648L, -1L), -1)
}

///|
test "test_compare_u(-2147483648, 1) = 1" {
  assert_eq(test_compare_u(-2147483648L, 1L), 1)
}

///|
test "test_compare_u(-2147483648, 2147483647) = 1" {
  assert_eq(test_compare_u(-2147483648L, 2147483647L), 1)
}

///|
test "test_compare_u(-2147483648, -2147483648) = 0" {
  assert_eq(test_compare_u(-2147483648L, -2147483648L), 0)
}

///|
test "test_compare_u(-2147483648, 2147483648) = 1" {
  assert_eq(test_compare_u(-2147483648L, 2147483648L), 1)
}

///|
test "test_compare_u(-2147483648, -2147483649) = 1" {
  assert_eq(test_compare_u(-2147483648L, -2147483649L), 1)
}

///|
test "test_compare_u(-2147483648, 9223372036854775807) = 1" {
  assert_eq(test_compare_u(-2147483648L, 9223372036854775807L), 1)
}

///|
test "test_compare_u(-2147483648, -9223372036854775808) = 1" {
  assert_eq(test_compare_u(-2147483648L, -9223372036854775808L), 1)
}

///|
test "test_compare_u(-2147483648, -9223372036854775808) = 1" {
  assert_eq(test_compare_u(-2147483648L, -9223372036854775808L), 1)
}

///|
test "test_compare_u(-2147483648, 9223372036854775807) = 1" {
  assert_eq(test_compare_u(-2147483648L, 9223372036854775807L), 1)
}

///|
test "test_compare_u(2147483648, 0) = 1" {
  assert_eq(test_compare_u(2147483648L, 0L), 1)
}

///|
test "test_compare_u(2147483648, -1) = -1" {
  assert_eq(test_compare_u(2147483648L, -1L), -1)
}

///|
test "test_compare_u(2147483648, 1) = 1" {
  assert_eq(test_compare_u(2147483648L, 1L), 1)
}

///|
test "test_compare_u(2147483648, 2147483647) = 1" {
  assert_eq(test_compare_u(2147483648L, 2147483647L), 1)
}

///|
test "test_compare_u(2147483648, -2147483648) = -1" {
  assert_eq(test_compare_u(2147483648L, -2147483648L), -1)
}

///|
test "test_compare_u(2147483648, 2147483648) = 0" {
  assert_eq(test_compare_u(2147483648L, 2147483648L), 0)
}

///|
test "test_compare_u(2147483648, -2147483649) = -1" {
  assert_eq(test_compare_u(2147483648L, -2147483649L), -1)
}

///|
test "test_compare_u(2147483648, 9223372036854775807) = -1" {
  assert_eq(test_compare_u(2147483648L, 9223372036854775807L), -1)
}

///|
test "test_compare_u(2147483648, -9223372036854775808) = -1" {
  assert_eq(test_compare_u(2147483648L, -9223372036854775808L), -1)
}

///|
test "test_compare_u(2147483648, -9223372036854775808) = -1" {
  assert_eq(test_compare_u(2147483648L, -9223372036854775808L), -1)
}

///|
test "test_compare_u(2147483648, 9223372036854775807) = -1" {
  assert_eq(test_compare_u(2147483648L, 9223372036854775807L), -1)
}

///|
test "test_compare_u(-2147483649, 0) = 1" {
  assert_eq(test_compare_u(-2147483649L, 0L), 1)
}

///|
test "test_compare_u(-2147483649, -1) = -1" {
  assert_eq(test_compare_u(-2147483649L, -1L), -1)
}

///|
test "test_compare_u(-2147483649, 1) = 1" {
  assert_eq(test_compare_u(-2147483649L, 1L), 1)
}

///|
test "test_compare_u(-2147483649, 2147483647) = 1" {
  assert_eq(test_compare_u(-2147483649L, 2147483647L), 1)
}

///|
test "test_compare_u(-2147483649, -2147483648) = -1" {
  assert_eq(test_compare_u(-2147483649L, -2147483648L), -1)
}

///|
test "test_compare_u(-2147483649, 2147483648) = 1" {
  assert_eq(test_compare_u(-2147483649L, 2147483648L), 1)
}

///|
test "test_compare_u(-2147483649, -2147483649) = 0" {
  assert_eq(test_compare_u(-2147483649L, -2147483649L), 0)
}

///|
test "test_compare_u(-2147483649, 9223372036854775807) = 1" {
  assert_eq(test_compare_u(-2147483649L, 9223372036854775807L), 1)
}

///|
test "test_compare_u(-2147483649, -9223372036854775808) = 1" {
  assert_eq(test_compare_u(-2147483649L, -9223372036854775808L), 1)
}

///|
test "test_compare_u(-2147483649, -9223372036854775808) = 1" {
  assert_eq(test_compare_u(-2147483649L, -9223372036854775808L), 1)
}

///|
test "test_compare_u(-2147483649, 9223372036854775807) = 1" {
  assert_eq(test_compare_u(-2147483649L, 9223372036854775807L), 1)
}

///|
test "test_compare_u(9223372036854775807, 0) = 1" {
  assert_eq(test_compare_u(9223372036854775807L, 0L), 1)
}

///|
test "test_compare_u(9223372036854775807, -1) = -1" {
  assert_eq(test_compare_u(9223372036854775807L, -1L), -1)
}

///|
test "test_compare_u(9223372036854775807, 1) = 1" {
  assert_eq(test_compare_u(9223372036854775807L, 1L), 1)
}

///|
test "test_compare_u(9223372036854775807, 2147483647) = 1" {
  assert_eq(test_compare_u(9223372036854775807L, 2147483647L), 1)
}

///|
test "test_compare_u(9223372036854775807, -2147483648) = -1" {
  assert_eq(test_compare_u(9223372036854775807L, -2147483648L), -1)
}

///|
test "test_compare_u(9223372036854775807, 2147483648) = 1" {
  assert_eq(test_compare_u(9223372036854775807L, 2147483648L), 1)
}

///|
test "test_compare_u(9223372036854775807, -2147483649) = -1" {
  assert_eq(test_compare_u(9223372036854775807L, -2147483649L), -1)
}

///|
test "test_compare_u(9223372036854775807, 9223372036854775807) = 0" {
  assert_eq(test_compare_u(9223372036854775807L, 9223372036854775807L), 0)
}

///|
test "test_compare_u(9223372036854775807, -9223372036854775808) = -1" {
  assert_eq(test_compare_u(9223372036854775807L, -9223372036854775808L), -1)
}

///|
test "test_compare_u(9223372036854775807, -9223372036854775808) = -1" {
  assert_eq(test_compare_u(9223372036854775807L, -9223372036854775808L), -1)
}

///|
test "test_compare_u(9223372036854775807, 9223372036854775807) = 0" {
  assert_eq(test_compare_u(9223372036854775807L, 9223372036854775807L), 0)
}

///|
test "test_compare_u(-9223372036854775808, 0) = 1" {
  assert_eq(test_compare_u(-9223372036854775808L, 0L), 1)
}

///|
test "test_compare_u(-9223372036854775808, -1) = -1" {
  assert_eq(test_compare_u(-9223372036854775808L, -1L), -1)
}

///|
test "test_compare_u(-9223372036854775808, 1) = 1" {
  assert_eq(test_compare_u(-9223372036854775808L, 1L), 1)
}

///|
test "test_compare_u(-9223372036854775808, 2147483647) = 1" {
  assert_eq(test_compare_u(-9223372036854775808L, 2147483647L), 1)
}

///|
test "test_compare_u(-9223372036854775808, -2147483648) = -1" {
  assert_eq(test_compare_u(-9223372036854775808L, -2147483648L), -1)
}

///|
test "test_compare_u(-9223372036854775808, 2147483648) = 1" {
  assert_eq(test_compare_u(-9223372036854775808L, 2147483648L), 1)
}

///|
test "test_compare_u(-9223372036854775808, -2147483649) = -1" {
  assert_eq(test_compare_u(-9223372036854775808L, -2147483649L), -1)
}

///|
test "test_compare_u(-9223372036854775808, 9223372036854775807) = 1" {
  assert_eq(test_compare_u(-9223372036854775808L, 9223372036854775807L), 1)
}

///|
test "test_compare_u(-9223372036854775808, -9223372036854775808) = 0" {
  assert_eq(test_compare_u(-9223372036854775808L, -9223372036854775808L), 0)
}

///|
test "test_compare_u(-9223372036854775808, -9223372036854775808) = 0" {
  assert_eq(test_compare_u(-9223372036854775808L, -9223372036854775808L), 0)
}

///|
test "test_compare_u(-9223372036854775808, 9223372036854775807) = 1" {
  assert_eq(test_compare_u(-9223372036854775808L, 9223372036854775807L), 1)
}

///|
test "test_compare_u(-9223372036854775808, 0) = 1" {
  assert_eq(test_compare_u(-9223372036854775808L, 0L), 1)
}

///|
test "test_compare_u(-9223372036854775808, -1) = -1" {
  assert_eq(test_compare_u(-9223372036854775808L, -1L), -1)
}

///|
test "test_compare_u(-9223372036854775808, 1) = 1" {
  assert_eq(test_compare_u(-9223372036854775808L, 1L), 1)
}

///|
test "test_compare_u(-9223372036854775808, 2147483647) = 1" {
  assert_eq(test_compare_u(-9223372036854775808L, 2147483647L), 1)
}

///|
test "test_compare_u(-9223372036854775808, -2147483648) = -1" {
  assert_eq(test_compare_u(-9223372036854775808L, -2147483648L), -1)
}

///|
test "test_compare_u(-9223372036854775808, 2147483648) = 1" {
  assert_eq(test_compare_u(-9223372036854775808L, 2147483648L), 1)
}

///|
test "test_compare_u(-9223372036854775808, -2147483649) = -1" {
  assert_eq(test_compare_u(-9223372036854775808L, -2147483649L), -1)
}

///|
test "test_compare_u(-9223372036854775808, 9223372036854775807) = 1" {
  assert_eq(test_compare_u(-9223372036854775808L, 9223372036854775807L), 1)
}

///|
test "test_compare_u(-9223372036854775808, -9223372036854775808) = 0" {
  assert_eq(test_compare_u(-9223372036854775808L, -9223372036854775808L), 0)
}

///|
test "test_compare_u(-9223372036854775808, -9223372036854775808) = 0" {
  assert_eq(test_compare_u(-9223372036854775808L, -9223372036854775808L), 0)
}

///|
test "test_compare_u(-9223372036854775808, 9223372036854775807) = 1" {
  assert_eq(test_compare_u(-9223372036854775808L, 9223372036854775807L), 1)
}

///|
test "test_compare_u(9223372036854775807, 0) = 1" {
  assert_eq(test_compare_u(9223372036854775807L, 0L), 1)
}

///|
test "test_compare_u(9223372036854775807, -1) = -1" {
  assert_eq(test_compare_u(9223372036854775807L, -1L), -1)
}

///|
test "test_compare_u(9223372036854775807, 1) = 1" {
  assert_eq(test_compare_u(9223372036854775807L, 1L), 1)
}

///|
test "test_compare_u(9223372036854775807, 2147483647) = 1" {
  assert_eq(test_compare_u(9223372036854775807L, 2147483647L), 1)
}

///|
test "test_compare_u(9223372036854775807, -2147483648) = -1" {
  assert_eq(test_compare_u(9223372036854775807L, -2147483648L), -1)
}

///|
test "test_compare_u(9223372036854775807, 2147483648) = 1" {
  assert_eq(test_compare_u(9223372036854775807L, 2147483648L), 1)
}

///|
test "test_compare_u(9223372036854775807, -2147483649) = -1" {
  assert_eq(test_compare_u(9223372036854775807L, -2147483649L), -1)
}

///|
test "test_compare_u(9223372036854775807, 9223372036854775807) = 0" {
  assert_eq(test_compare_u(9223372036854775807L, 9223372036854775807L), 0)
}

///|
test "test_compare_u(9223372036854775807, -9223372036854775808) = -1" {
  assert_eq(test_compare_u(9223372036854775807L, -9223372036854775808L), -1)
}

///|
test "test_compare_u(9223372036854775807, -9223372036854775808) = -1" {
  assert_eq(test_compare_u(9223372036854775807L, -9223372036854775808L), -1)
}

///|
test "test_compare_u(9223372036854775807, 9223372036854775807) = 0" {
  assert_eq(test_compare_u(9223372036854775807L, 9223372036854775807L), 0)
}

///|
test "grouped test for boundary cases" {
  // Test for the smallest UInt64 value
  inspect(UInt64::reinterpret_as_double(0UL), content="0")

  // Test for the largest UInt64 value
  inspect(UInt64::reinterpret_as_double(0xFFFFFFFFFFFFFFFFUL), content="NaN")

  // Test for a value near the boundary
  inspect(UInt64::reinterpret_as_double(0x7FFFFFFFFFFFFFFFUL), content="NaN")
}

///|
test "grouped test for random cases" {
  // Random values
  inspect(
    UInt64::reinterpret_as_double(0x123456789ABCDEF0UL),
    content="5.626349274901198e-221",
  )
  inspect(
    UInt64::reinterpret_as_double(0xABCDEF0123456789UL),
    content="-1.0948396824175042e-97",
  )
  inspect(
    UInt64::reinterpret_as_double(0x5555555555555555UL),
    content="1.1945305291614955e+103",
  )
  inspect(
    UInt64::reinterpret_as_double(0xAAAAAAAAAAAAAAAAUL),
    content="-3.7206620809969885e-103",
  )
  inspect(
    UInt64::reinterpret_as_double(0x1111111111111111UL),
    content="1.8010757365944223e-226",
  )
  inspect(UInt64::reinterpret_as_double(0xFFFFFFFF00000000UL), content="NaN")
}

///|
test "grouped test for specific patterns" {
  // Test for alternating bits
  inspect(
    UInt64::reinterpret_as_double(0xAAAAAAAAAAAAAAAAUL),
    content="-3.7206620809969885e-103",
  )
  inspect(
    UInt64::reinterpret_as_double(0x5555555555555555UL),
    content="1.1945305291614955e+103",
  )

  // Test for all bits set except the most significant bit
  inspect(UInt64::reinterpret_as_double(0x7FFFFFFFFFFFFFFFUL), content="NaN")
}
